What does LEGB stand for in Python scope resolution?
Correct answer
D. Local, Enclosing, Global, Built-in
8 views
D. Local, Enclosing, Global, Built-in
8 views
Python looks up names in Local, Enclosing, Global and Built-in scopes in that order.
Asked in: Python Interview Functions
https://docs.python.org/3/tutorial/controlflow.html#defining-functionsNot sure why the answer is D? Ask here and get an explanation.