I created a text file with name important
on windows and stored the file in documents but when I try to access the file with the command open('important')
I get the following traceback message:
C:\Users\donad trump\Documents\python4me\train>python.exe test4.py
Traceback (most recent call last):
File "test4.py", line 1, in <module> file = open('important')
FileNotFoundError: [Errno 2] No such file or directory: 'important'
My code is:
file = input('important')
reat = file.read()
print(reat)