valid_file = False while not valid_file: dest_file = input("Enter file's path: ") try: retval = openfile(dest_file) except FileNotFoundError: print("Invalid file path given") else: valid_file = True
1.4m articles
1.4m replys
5 comments
57.0k users