I want to end each interation of a for loop with writing a new line of content (including newline) to a csv file. I have this:
# Set up an output csv file with c
with open('outfile.csv', 'w', newline='') as f: f.writerow(...)
Alternatively:
f = csv.writer('outfile.csv', lineterminator='\n')
I confront with same problem, only need follow:
change 'w' to 'a'
with open('outfile.csv','a')