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,185
  • 3
  • 15
  • 28
Animesh
  • 4,926
  • 14
  • 68
  • 110

1 Answers1

7

csv

csvwriter.writerows()

Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358