LEGB Rules for Python Variables
LEGB is a fundamental concept in Python that defines how variables are found in different scopes.
It stands for:
Local: - The first scope Python checks.
- Contains variables defined within a function or block of code.
- Accessible only within that fu...
datailm.hashnode.dev2 min read