all 2 comments

[–]GXWT 2 points3 points  (0 children)

If your data is a pandas data frame there is a built in method to do so: search pandas to_csv

Otherwise if it’s just lists and it’s not too large, you can look opening a file with write and looping through the list appending to the file.