CBSE Class 11 Computer Science
Question 39 of 63
Introduction to Python Modules — Question 8
Back to all questionsWhen we access a variable from within a program or function, Python follows name resolution rule, also known as LEGB rule. When Python encounters a name (variable or function), it first searches the local scope (L), then the enclosing scope (E), then the global scope (G), and finally the built-in scope (B).