def func(): x = 4 action = (lambda n: x ** n) # x in enclosing def return actionx = func()print x(2) # prints 16