python if file exists the read code example
Example: how to check whether file exists in python
import os.path
if os.path.isfile('filename.txt'):
print ("File exist")
else:
print ("File not exist")
import os.path
if os.path.isfile('filename.txt'):
print ("File exist")
else:
print ("File not exist")