Learn

Great job! You’ve learned some important concepts in Python regarding namespaces.

In this lesson, we’ve covered:

  • Names as identifiers for objects in Python.
  • What namespaces are.
  • The built-in namespace and how to access it using __builtins__.
  • The global namespace and how to access it using globals().
  • The local namespace and how to access it using locals().
  • The enclosing namespace - a special type of local namespace that occurs when working with nested functions.

Knowing these concepts allows for a stronger mastery of Python since names are the basis of how our programs store and retrieve information. Keep up the great work!

Instructions

Take some time to review the namespace structure that was covered in this lesson.

Sign up to start coding

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?