LeGB Rule in python
LEGB Rule in Python Local Scope: Variables defined within a function are said to have local scope. That means they can only be accessed within that function. Enclosing Scope: In Python, functions can be defined within other functions. If a variable is not defined in the inner function (local scope) it will be looked for …