Simply import the "os" module and using the "exists" function, it will return a boolean value as True/ False. Write the below command:
print(os.path.exists("path"))
You can also check whether the desired path is a directory or a file. For that, use the below command:
print(os.path.isdir("path"))