Python Professional — Hard
Key points
- `nonlocal` is used for variables in an outer function's scope
- It enables nested functions to modify variables from the outer function
- `nonlocal` is different from `global` in its scope-binding behavior
Ready to go further?
Related questions
