I know that this code can work.
def mom_func():
temp = 0
def son_func() :
a = temp
and then why this code cannot work ?
def mom_func():
temp = 0
def son_func() :
a = temp
temp = 1
error message is Unresolved reference 'temp'
def mom_func():
temp = 0
def son_func() :
a = temp
print(a)
son_func()
this code can work print '0' and when i have set temp to '7', then code printed '7' !