3 ms·
What do you mean "everything is global"? You can't have scoped variables in Python?
by otherme123 2y ago
What do you mean "everything is global"? You can't have scoped variables in Python?
- jononor 2y agoVariables are lexically scoped. Additionally, to _assign_ to an outer/global variable, one needs to use the nonlocal/global keyword. Otherwise one will get a new local variable. Variables in a module are also namespaced to that module. So I have no idea what the "everything is global" scope is about.