Dive into Python is excellent work but really confusing stuff. You can use mode "a" to append: Code: fd = open("myfile", "a") fd.write("some text") fd.close()
fd = open("myfile", "a") fd.write("some text") fd.close()