I would like to ask whether it is possible to change the scope of a function form the environment in which it was created to the environment where it is being called.
Example:
a = 1
def func():
print(a)
func()
returns 1. Now if I create the following function:
def exe():
a = 3
func()
exe()
returns 1. I want to know whether it is possible to make exe()
return 3 (without passing a as an argument).