Stay With us
3 new comments

beginner
new

Help & Settings
About
Help
Tips

append text to a file without changing previous text

I want to append a new text in my file using python. It should not delete the previous text in the file. How can i do this in python. Here is my code in python

text = "Hello World"
saveFile = open('hello.txt','w')
saveFile.write(text)
saveFile.close()

(0) Replies

Please login or register to Comment or Answer