I have a list of lists and need to write each of its elements in csv columns. Using the code below it outputs exactly what I want.
for row in izip_longest(*averages_, fillvalue = ['']):
writer.writerow(row[0] + row[1])
a sample line of row[0]:
['0.000000', '0.000586', '0.005819', '0.011434', '0.052012', 0.000586118993]
Question:
How can I replace the part (row[0] + row[1])
with a code with a variable in it so that it automatically adds any number of sub-lists (row[i] + row[i+1] + row[i+2]...)
in the main list?