'''
# @Time    : 2020/3/13 13:40
# @Author  : Neo
# @File    : globallocal.py
'''
a_string = "This is a global variable"

def foo():
    a_string = "test" # 1
    print (locals())

'This is a global variable'

lst = []

def foo1():
    lst.append(233)
    s= 1
    print(globals())
    print (locals())
foo1() # 3

9ca10f66062a5702524e3e3e0a46af3c36d92043
<mask token>


def foo1():
    lst.append(233)
    s = 1
    print(globals())
    print(locals())


<mask token>

<mask token>


def foo():
    a_string = 'test'
    print(locals())


<mask token>


def foo1():
    lst.append(233)
    s = 1
    print(globals())
    print(locals())


<mask token>

<mask token>


def foo():
    a_string = 'test'
    print(locals())


<mask token>


def foo1():
    lst.append(233)
    s = 1
    print(globals())
    print(locals())


foo1()

<mask token>
a_string = 'This is a global variable'


def foo():
    a_string = 'test'
    print(locals())


<mask token>
lst = []


def foo1():
    lst.append(233)
    s = 1
    print(globals())
    print(locals())


foo1()

'''
# @Time    : 2020/3/13 13:40
# @Author  : Neo
# @File    : globallocal.py
'''
a_string = "This is a global variable"

def foo():
    a_string = "test" # 1
    print (locals())

'This is a global variable'

lst = []

def foo1():
    lst.append(233)
    s= 1
    print(globals())
    print (locals())
foo1() # 3
