Nonlocal Keyword In Function || Global Variables || Python
In this we are going to see a basic program using nonlocal variables in function in global variables in Python Programming Language.



def outer():
    x = "Outer"

    def inner():
        nonlocal x
        x = "Inner"
        print(x)
    inner()
    print(x)


outer()

# Coded By DHIRAJ SHELKE


#ENJOY CODING


Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post