Trying to write data to a file like this:
f = open('test.txt', 'w') f.write("test") f.close() with open('test.txt', 'w') as f: f.write("test") The first method and the second one do not give any results; I run the script in this way E:\cript.py
I understand correctly that I should appear in the same directory, where is the script itself, the new file named test? Why it doesn’t appear, it seems to be right, there are no errors in the console ...
upd: file was created manually, assigned rights for everyone to everything, but the text does not appear in it