How to import two lists into two columns in CSV with Python

Posted on: October 21st, 2022
By: Tadeo Martinez

Here’s a Stack Overflow question on it:

https://stackoverflow.com/questions/19302612/how-to-write-data-from-two-lists-into-columns-in-a-csv

import csv

with open('somenew.csv', 'w') as f:
    writer = csv.writer(f)
    writer.writerows(zip(titlesAll, datesAll))

Have any questions or comments? Write them below!


Leave a Reply

Your email address will not be published. Required fields are marked *