Open file doubt

Can’t we give absolute path while opening a file?

Hello @vatsal50, yes you can use the absolute path as well.
I hope it is clear to you and in case any other issue is there pls let me know.
In case it is clear to you pls mark it as resolve and feel free to provide the feedback.
Thanks :slight_smile:

I tried but its not finding the path. I tried in jupyter

Hello @vatsal50, can you pls show me the path from where you were accessing and what path?
May there is some error while mentioning the path.

C:\Users\vtewa\OneDrive\Desktop\java.txt

Try out this,
file = open(“C:\Users\vtewa\OneDrive\Desktop\java.txt”,“r”)
Here I am just mentioning the path you can try it with any operation whether read or write.

It is showing SyntaxError: (unicode error) ‘unicodeescape’ codec can’t decode bytes in position 2-3: truncated \UXXXXXXXX escape

Hello is it possible that tom at some time we can arrange a google meet and I can note all your doubts. You can tell me the timings. At 3pm will you be free ??

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.