LogiQuest
Back to Exceptions
20

What is the output of the following code?

def check(x):
    assert x > 0, 'must be positive'
try:
    check(-1)
except AssertionError as e:
    print(e)
Medium

Discussion (0)

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

Log in to join the discussion.