I have say three lists, and one of them is nested like so:
a = [1, 2, 3, 4]
b = ["abc", "def", "dec", "erf"]
c = [[5, 6, 7], [8, 9, 10], [11, 12, 13.3], [14, 15, 16]]
I would like a CSV
file output of it which looks like this:
1,abc,5,6,7
2,def,8,9,10
3,erf,11,12,13.3
...
I tried zipping them and writing to a CSV
file like so:
with open('filer.csv', "w") as f:
writer = csv.writer(f)
for row in zip(a, b, c):
writer.writerow(row)
but the output has these stupid brackets like so:
1,abc,"[5,6,7]"
2,def,"[8,9,10]"
3,erf,"[11,12,13.3]"
...
but I want them without brackets and without the quotes like so:
1,abc,5,6,7
2,def,8,9,10
3,erf,11,12,13.3
...
:(