LogiQuest
Back to Exceptions
14

What is the output of the following code?

def g():
    try:
        raise KeyError
    except KeyError:
        return 'handled'
    finally:
        print('cleanup', end=' ')
print(g())
Medium

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.