Python os.path.exists() Method
The os.path.exists() method checks if a path exists.
Syntax
os.path.exists(path)
Return Value
True if path exists, False otherwise.
Example
Output
Click Run to execute your code