I have a few situations where i am taking a list of raw data and am passing it into a class. At present it looks something like this:
x = Classname(
listname[0],
listname[1],
listname[2],
listname[3],
listname[4],
listname[5],
listname[6],
listname[7],
...
)
and so on. This is quite long and frustrating to read, especially when i am doing it multiple times in the same file, so i was wondering if there was a simpler way to write this? Something to the effect of:
x = Classname(
# item for item in list
)
Any help would be appreciated, my brain is fried. Cheers.