I am trying to make a file that I can continuously add '../' to. My code is as follows:
with open("/tmp/newfile.txt", "a+") as myfile: myfile.write('../') contents = myfile.read() print(contents) However, when I run this code it returns <empty>
I am trying to make a file that I can continuously add '../' to. My code is as follows:
with open("/tmp/newfile.txt", "a+") as myfile: myfile.write('../') contents = myfile.read() print(contents) However, when I run this code it returns <empty>