Quiz: The LEGB Rule & Understanding Python Scope

Interactive Quiz ⋅ 8 Questions
By Joseph Peart


In this quiz, you’ll test your understanding of The LEGB Rule & Understanding Python Scope.

By working through this quiz, you’ll revisit how Python resolves names using the LEGB rule, what the local, enclosing, global, and built-in scopes look like in practice, and how the global and nonlocal statements let you reach across scope boundaries.

The quiz contains 8 questions and there is no time limit. You’ll get 1 point for each correct answer. At the end of the quiz, you’ll receive a total

 

 

 

To finish reading, please visit source site