Question OOP-EXC-0061
HardWhat is the output of this code?
def f():
try:
return "try"
finally:
return "finally"
print(f())
- A.
SyntaxError
- B.
finally
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Exception Handling question
What is the output of this code?
def f():
try:
return "try"
finally:
return "finally"
print(f())
SyntaxError
finally
Sign up free to see the answer and a step-by-step explanation.
try
try finally