Skip to content
Quiz · Exceptions · lesson 5 of 11

Quiz — finally and return

What does the program print?

Python
def check(x):
    try:
        y = 10 / x
    except ZeroDivisionError:
        return "zero"
    else:
        return "ok"
    finally:
        print("done", end=" ")


print(check(0))

Subscribe to take the course

The course is free. Sign in with Telegram and subscribe to the channel to open every lesson.

Sign in another way