What is the LEGB rule for?

Questions & AnswersCategory: PythonWhat is the LEGB rule for?
Geek Boy Staff asked 2 years ago

What is the LEGB rule for?
a. This is the rule by which Python executes instructions.
b. This is the rule by which Python resolves names. The letters in LEGB stand for Local, Enclosing, Global and Built-in scope.
c. This is the rule by which Python manages memory.

1 Answers