Is there a way to change a variable inside function A from function B when function A called function B
For example:
def a():
flag = False
b()
print(flag)
def b():
flag = True
I would like flag == True
another example:
def a():
list = [1,2,3]
b():
return list
def b():
list.append(4)