File handling error while reading file

I have saved my text file in notepad but it not
reading the file showing ,error:: no such file in derectory.
Why it is happening .

Hello Tanu, most probably the error is that the path is wrong that you have mentioned while accessing the file put your file that you want to access in the same folder that consists of your .py or .ipynb file or specify the full path of the file that you want to access.

I hope it is clear to you. Incase there is any doubt/confusion you can ask me I will help you out, just let me know about that.
And if it is clear to you pls mark it as resolve and provide the feedback/rating so that we can improve our services.
Thanks :slight_smile:
Happy Coding !!

i am saviong my file into same folder but it is showing same error.

i also tried to pass the address of file in open () but it showing wrong arguement error

Can you pls share the code and pls also tell me the location of both the files.

I am just simply trying this CODE :f=open(“python.txt”,‘w’) f.read()

I an running my file in IDLE(pyhon3.8.1) and i have saved my both files (.txt and .py) there

Hey Tanu, pls see the error you are opening the file in writing mode by using ‘w’ and then using f.read() which is used when we open the file in read mode pls see this error. You need to specify
f = open(“python.txt”,‘r’)
I hope it is clear to you. Incase there is any doubt/confusion you can ask me I will help you out, just let me know about that.
And if it is clear to you pls mark it as resolve and provide the feedback/rating so that we can improve our services.
Thanks :slight_smile:
Happy Coding !!