Why is my CSV write function not working? This seems to be a very simple code but the CSV writerow is asking for an iterable. I just need to write the 1,2,3 in a column.
import csv
data = [1,2,3]
output = 'output.csv'
with open(output,'w') as f:
writer = csv.writer(f)
for item in data:
writer.writerow(item)
writer.writerow([item])newline=''toopen, so you won't be getting that anyway.