scope01.py

# ===================================================================
#
# ===================================================================

x = 'Main X Value'

def FuncA():

    x = 'FuncA X Value'

    def FuncAA():
        x = 'FuncAA X value'
        print('in FuncAA x = {}'.format(x))

    FuncAA()

    print('in FuncA  x = {}'.format(x))

# -------------------------------------------------------------------
# main
# -------------------------------------------------------------------

FuncA()

print('in main   x = {}'.format(x))