I have the following source code, where I am trying to write a list in a csv file. I need every new list to be written in a new line of this csv file. The source code is the following:
import csv
list1=[55,100,'dir1/dir2/dir3/file.txt',0.8]
resultFile = open("output.csv",'wa')
wr = csv.writer(resultFile, dialect='excel')
wr.writerow(list1)
resultFile.close()
The problem is that it doesn't insert list1 in a newline every time i run the code.
In matlab that would be easy, I just need to use dlmwrite with '-append' parameter.
But how to do this in Python?