Computer Science, asked by mayankmewari64, 1 year ago

How does python resolve the scope of a name or identifier?

Answers

Answered by xKinGx
14

Scope resolution for a given name begins from the inner-most function and then goes higher and higher until the program finds the related object. If the search ends without any outcome, then the program throws a NameError exception.

Similar questions