checking availability of user inputted file name

Solutions on MaxInterview for checking availability of user inputted file name by the best coders in the world

showing results for - "checking availability of user inputted file name"
Ana Sofia
26 Jan 2019
1FileName = raw_input("Please input a Valid File Name : ")
2if os.path.isfile("C:/Users/Brads/Documents/" + FileName + ".txt"):
3    print("File Exists")
4else:
5    print("File does not exist")
6
similar questions