import os fname=input("Enter file name:") if os.path.exists(fname):     print("File exist") else:     print("File not exist")