Write a python program to Checking if a File Exists or Not ?
Write a python program to Checking if a File Exists or Not ?
Write a python program to Checking if a File Exists or Not ?
Program
import os.path
def myfun():
file = os.path.exists('abc.txt')
if file:
print('This file does exist')
else:
print('This file does Not exist')
if __name__=="__main__":
myfun()