LogiQuest
Back to Functions
9

What is the output of the following code?

def outer():
    count = 0
    def inner():
        nonlocal count
        count += 1
        return count
    return inner
c = outer()
c()
print(c())
Hard

Discussion (0)

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

Log in to join the discussion.