I have a csv of the form:
name,age,country john,23,japan mel,27,ireland When I try to append with the following code:
import csv info=['kirsty','32','germany'] with open('data.csv','a') as file: writer=csv.writer(file) writer.writerow(info) file.close() I get this on opening the file in notepad:
name,age,country john,23,japan mel,27,irelandkirsty,32,germany I dont understand why the new entry isn't appending to the next line.
\n.writer.writerow("\n")before you write the info\nalso show up in the new csv.file.write('\n').