Python Scope Resolution - LEGB Rule | Python Tutorial in Hindi | #71

Опубликовано: 13 Июль 2026
на канале: Code With Daneyal
184
6

In this video, you will learn,

Using the LEGB Rule for Python Scope

Python resolves names using the so-called LEGB rule, which is named after the Python scope for names. The letters in LEGB stand for Local, Enclosing, Global, and Built-in.

Functions: The Local Scope
Nested Functions: The Enclosing Scope
Modules: The Global Scope
builtins: The Built-In Scope

#codewithdaneyal