3

I have a list that has data as following:

[[a,b,1], [c,d,3], [a,c,2], [c,d,1]]  

How can I write this list of lists to a csv file?

I tried this, but it did not work.

with open('output.csv', 'w') as f:
    f.write((list))
Ambo100
  • 1,125
  • 3
  • 15
  • 28
Animesh
  • 4,856
  • 12
  • 67
  • 106

1 Answers1

7

csv

csvwriter.writerows()

Ignacio Vazquez-Abrams
  • 740,318
  • 145
  • 1,296
  • 1,325