Virtually everything that a Python program uses or acts on is an object. Even a short program will create many different objects. In a more complex program, they’ll probably number in the thousands. Python has to keep track of all these objects and their names, and it does so with namespaces.
In this course, you learned:
- What the different namespaces are in Python
- When Python creates a new namespace
- What structure Python uses to implement namespaces
- How namespaces define scope in a Python program
- How the LEGB rule applies to scope
Congratulations, you made it to the end of the course! What’s your #1 takeaway or favorite thing you learned? How are you going to put your newfound skills to use? Leave a comment in the discussion section and let us know.