Problem of writing long list of lists file to csv

Peter Otten __peter__ at web.de
Tue May 22 06:25:28 EDT 2018


subhabangalore at gmail.com wrote:

>     lst2=lst1[:4]
>     with open("my_csv.csv","wb") as f:
>         writer = csv.writer(f)
>         writer.writerows(lst2)
> 
> Here it is writing only the first four lists. 

Hint: look at the first line in the quotation above. 





More information about the Python-list mailing list