import csv with open('some.csv', 'w', newline='') as f: writer = csv.writer(f) writer.writerows(someiterable)