def A():
Ab = 1
return Ab
def B():
print(A())
B()
AB=721
def A():
print(AB)
def B():
print(AB)
AB = 721
def A():
AC = 831
return AC
def B(Var) :
print(Var)
B(AB) # output 721
B(A()) # output 831
B(AC) #output error
def A():
res = 1+1 #sample
return res
def B():
print (A())
def A():
global res
res = 1+1
def B():
print (res)