?
What happens if the file is not found in the following Python code?
What happens if the file is not found in the following Python code?
a=False
while not a:
try:
f_n = input("Enter file name")
i_f = open(f_n, 'r')
except:
print("Input file not found")
a=False
while not a:
try:
f_n = input("Enter file name")
i_f = open(f_n, 'r')
except:
print("Input file not found")
Join the Discussion
Login to post a comment or share your explanation.
Login