Nov-01-2018, 09:23 PM
https://docs.python.org/3/library/functions.html#open
Open the file in Append (a) mode, instead of Write (w) mode:
Open the file in Append (a) mode, instead of Write (w) mode:
1 2 |
with open ( 'myfile.csv' , 'a' ) as the_file: print ( "spam,foo,bar,test" , file = the_file) |