I am stuck to this weirdly small problem for like 3 hours and i just can't find the fix of it. Here look at the problem I'm trying to read a .txt file(greetings.txt) which contains a simple message and both- the .txt file and the program to read the file (readingfile.py) are inside the same folder, but still when i try to run the program which should return the text inside the .txt file , instead , it's throwing an error FileNotFoundError: [Errno 2] No such file or directory: 'greetings.txt' If you think you familiar with this issue please help.
The code is written below and i will be also attaching an image please check that as well.Go through this link to view the image
with open('greetings.txt') as file:
content = file.read()
print(content)