i have written a programme in python that write two a file. But i want to write text to a file the previous text is removed and new text is written in the file. I want to write text file without removing the previous text in file. Here is my programme.
text = "this is new text" WriteText = ('previousFile.txt','w') WriteText.write(text) WriteText.close()
Now i want to write new text without removing old text to file.