I am running python 3.7 in Wing IDE as an administrator.
The python file is in the same folder (Documents) as the textdoc file.
This is the python code I have:
file = open("textdoc.txt", "r")
print(file.readlines())
file.close()
This is the content of the notepad (.txt) file called textdoc:
blue
red
green
When I run the program, I get this error:
Traceback (most recent call last):
Python Shell, prompt 2, line 3
builtins.FileNotFoundError: [Errno 2] No such file or directory: 'textdoc.txt'
Another issue is that while I am able to create and write to files in Python using the write mode, I can't actually find the text file that was created anywhere in case I want to edit it manually.