import os
path = "------------------"
if os.path.exists(path): **YOU CAN SEE THE WHOLE CODE IN THE IMAGE**
print("it does exist!")
else:
print("it doesnt")
I tried to detect a text file location and write code for it in VS Code but the result didn’t go as I expected. It was not able to detect the file location.
New contributor
Nipun Mangla is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
3