Fix Python – Why nested functions can access variables from outer functions, but are not allowed to modify them [duplicate]
This question already has answers here:
Is it possible to modify a variable in python that is in an outer (enclosing), but not global, scope?
Closed 8 years ago.
In the 2nd case below, Python tries to look for a ….