Variable Scope in Python
The extraordinary short guide to Pythons crazy scoping rules
Published in
4 min readNov 22, 2020
It’s obvious that you cannot access a variable before it was declared. But if it was declared inside a loop, can you access it outside a loop? If it was declared in a function, can you access the variable outside of the function?