Kizspy | Question: 24
(Choose 1 answer)
The following code sequence fails with a traceback when the user enters a file that does not exist. How would
you avoid the traceback and make it so you could print out your own error message when a bad file name
was entered?
fname = raw_input('Enter the file name: ')
open(fname)
fhand
A. try / except
FJOVERFLOW.COM
B. signal handlers
C. try/catch/finally
D. on error resume next