>>> x=
>>> def outerfunc():
    x = 

    def scoped_local():
        x = 
        return  + x
    print(scoped_local())

    def scoped_nonlocal():
        nonlocal x
        return  + x
    print(scoped_nonlocal())

    def scoped_global():
        global x
        return  + x
    print(scoped_global())

    def scoped_notdefinedlocally():
        return  + x
    print(scoped_notdefinedlocally())


>>> outerfunc()
scoped_local scope gives x = scope local
scoped_nonlocal scope gives x = From scope at outerfunc
scoped_global scope gives x = From global scope
scoped_notdefinedlocally scope gives x = From global scope
>>>