python check if file added to directory code example
Example: python os if file exists
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")