SyntaxFix
Write A Post
Hire A Developer
Questions
For another approach, you can use DataFrame in pandas: And it can easily dump the data to csv just like the code below:
import pandas df = pandas.DataFrame(data={"col1": list_1, "col2": list_2}) df.to_csv("./file.csv", sep=',',index=False)