
Mitchell F. answered 01/02/20
Tutor
New to Wyzant
Software Engineer Specializing in Python
Yes, this exists as a function in the 'path' python module. See the following code snippet...
import os
path = "/some/directory/location/"
if os.path.exists(path):
print(path + " exists!")
else:
print(path + " does not exist!")
The os.path.exists() function returns Boolean values.