file
. In case of appending, the mode is not w but
a.
This is an example text in an example file. It even has several lines.
1 f = file( "example.txt", "a") # open file "example.txt" for "a"ppending 2 3 f.write("Hi there.") # write something to the file 4 f.write("How do you do?") # write something more 5 6 f.close() # close the file