Daily #19 · 17 October 2026
Two returns Hard
What does this print?
def answer():
try:
return "try"
finally:
return "finally"
print(answer())
Show the answer
B: finally
Why: finally always runs, even on the way out of a return, and a return inside it replaces the one already in flight. Newer Pythons warn about exactly this, because it also swallows exceptions.