how to check if a file exists, it is a file and is readable code example
Example: file exist python
import os.path
if os.path.exists('filename.txt'):
print ("File exist")
else:
print ("File not exist")
import os.path
if os.path.exists('filename.txt'):
print ("File exist")
else:
print ("File not exist")