Source: wikibot/non-local-variable

= Non-local variable
{wiki=Non-local_variable}

In programming, a non-local variable refers to a variable that is not defined in the local scope of a function or block but is instead found in an outer scope. This can include variables defined in an enclosing function (if the current function is nested inside another function) or global variables. \#\#\# Key Points: 1. **Scope**: - A variable's scope determines where it can be accessed within the code.