How can I get python to edit a text file without wiping it completely or just appending to it? I'm using the code:
what_it_is=input("what do you want this file to say?\n")
file=open("the file path//text.txt", "w")
file.write(what_it_is)
but it wipes the file of all its content and replaces it with the new text I enter. Is there a way to read/write at the same time without losing the file's data?