René's URL Explorer Experiment


Title: Namespaces in Python – Real Python

Open Graph Title: Namespaces in Python – Real Python

Description: Python namespaces store and organize the symbolic names in your program. Learn when they're created, how they work, and how scope follows.

Open Graph Description: Python namespaces store and organize the symbolic names in your program. Learn when they're created, how they work, and how scope follows.

Mail addresses
?subject=Python article for you&body=Namespaces in Python on Real Python https://realpython.com/python-namespace/

Opengraph URL: https://realpython.com/python-namespace/

X: @realpython

direct link

Domain: realpython.com


Hey, it has json ld scripts:
{
  "@context": "http://schema.org",
  "@type": "Article",
  "headline": "Namespaces in Python",
  "image": {
    "@type": "ImageObject",
    "url": "https://files.realpython.com/media/UPDATE-Namespaces-and-Scope-in-Python_Watermarked.0597679893f1.jpg",
    "width": 1920,
    "height": 1080
  },
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://realpython.com/python-namespace/",
    "lastReviewed": "2026-10-30",
    "author": {
      "@type": "Person",
      "name": "Leodanis Pozo Ramos",
      "image": "https://realpython.com/cdn-cgi/image/width=862,height=862,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/Perfil_final1.9f896bc212f6.jpg",
      "url": "https://realpython.com/team/lpozoramos/",
      "affiliation": {
        "@type": "Organization",
        "@id": "https://realpython.com/#organization",
        "name": "Real Python",
        "url": "https://realpython.com",
        "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
      }
    },
    "reviewedBy": [
      {
        "@type": "Person",
        "name": "Aldren Santos",
        "image": "https://realpython.com/cdn-cgi/image/width=500,height=500,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/Aldren_Santos_Real_Python.6b0861d8b841.png",
        "url": "https://realpython.com/team/asantos/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Bryan Weber",
        "image": "https://realpython.com/cdn-cgi/image/width=1000,height=1000,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/BryanWeber-square.789781f1e92c.jpg",
        "url": "https://realpython.com/team/bweber/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Brenda Weleschuk",
        "image": "https://realpython.com/cdn-cgi/image/width=320,height=320,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/IMG_3324_1.50b309355fc1.jpg",
        "url": "https://realpython.com/team/bweleschuk/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Bartosz Zaczy\u0144ski",
        "image": "https://realpython.com/cdn-cgi/image/width=1694,height=1694,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/coders_lab_2109368.259b1599fbee.jpg",
        "url": "https://realpython.com/team/bzaczynski/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Joanna Jablonski",
        "image": "https://realpython.com/cdn-cgi/image/width=800,height=800,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/jjablonksi-avatar.e37c4f83308e.jpg",
        "url": "https://realpython.com/team/jjablonski/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Jacob Schmitt",
        "image": "https://realpython.com/cdn-cgi/image/width=400,height=400,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/profile-small_js.2f4d0d8da1ca.jpg",
        "url": "https://realpython.com/team/jschmitt/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "John Sturtz",
        "image": "https://realpython.com/cdn-cgi/image/width=1920,height=1920,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/real-python-logo-square.28474fda9228_1.146e987bf77c.png",
        "url": "https://realpython.com/team/jsturtz/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      }
    ]
  },
  "datePublished": "2026-10-10T14:00:00+00:00",
  "dateModified": "2026-10-30T10:24:42.402696+00:00",
  "publisher": {
    "@type": "Organization",
    "@id": "https://realpython.com/#organization",
    "name": "Real Python",
    "url": "https://realpython.com",
    "logo": {
      "@type": "ImageObject",
      "url": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png",
      "width": 512,
      "height": 512
    },
    "description": "Real Python is a leading provider of online Python education and one of the largest language-specific online communities for software developers. It publishes high-quality learning resources, such as tutorials, books, and courses to an audience of millions of developers, data scientists, and machine learning engineers each month.",
    "slogan": "Become a Python Expert",
    "email": "info@realpython.com",
    "sameAs": [
      "https://github.com/realpython",
      "https://www.youtube.com/realpython",
      "https://twitter.com/realpython",
      "https://x.com/realpython",
      "https://www.linkedin.com/company/realpython-com/",
      "https://www.facebook.com/learnrealpython",
      "https://www.instagram.com/realpython",
      "https://www.tiktok.com/@realpython.com"
    ]
  },
  "author": {
    "@type": "Person",
    "name": "Leodanis Pozo Ramos",
    "image": "https://realpython.com/cdn-cgi/image/width=862,height=862,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/Perfil_final1.9f896bc212f6.jpg",
    "url": "https://realpython.com/team/lpozoramos/",
    "affiliation": {
      "@type": "Organization",
      "@id": "https://realpython.com/#organization",
      "name": "Real Python",
      "url": "https://realpython.com",
      "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
    }
  },
  "description": "Python namespaces store and organize the symbolic names in your program. Learn when they're created, how they work, and how scope follows.",
  "hasPart": {
    "@type": "FAQPage",
    "mainEntity": [
      {
        "@type": "Question",
        "name": "What is a namespace in Python?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "\u003cp\u003eA Python namespace is a container that holds symbolic names mapped to objects. It behaves similarly to a dictionary where keys are names and values are objects.\u003c/p\u003e"
        }
      },
      {
        "@type": "Question",
        "name": "What are the different types of namespaces in Python?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "\u003cp\u003ePython has built-in, global, local, and enclosing namespaces, each with its own purpose and scope within a program.\u003c/p\u003e"
        }
      },
      {
        "@type": "Question",
        "name": "What is the difference between namespace and scope in Python?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "\u003cp\u003eA namespace maps names to objects, while a scope is a region in your code where you can access a given name.\u003c/p\u003e"
        }
      },
      {
        "@type": "Question",
        "name": "How does Python implement namespaces?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "\u003cp\u003ePython implements namespaces using dictionaries, with each namespace mapping names to objects within a particular scope.\u003c/p\u003e"
        }
      },
      {
        "@type": "Question",
        "name": "What is the LEGB rule in Python?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "\u003cp\u003eThe LEGB rule in Python stands for local, enclosing, global, and built-in. It describes the order in which Python searches for a name across different namespaces. This rule applies during the name resolution process.\u003c/p\u003e"
        }
      }
    ]
  }
}

authorReal Python
theme-color#18354c
color-schemelight dark
twitter:cardsummary_large_image
twitter:imagehttps://files.realpython.com/media/UPDATE-Namespaces-and-Scope-in-Python_Watermarked.0597679893f1.jpg
og:imagehttps://files.realpython.com/media/UPDATE-Namespaces-and-Scope-in-Python_Watermarked.0597679893f1.jpg
twitter:creator@realpython
og:typearticle
og:site_nameReal Python
apple-mobile-web-app-titleReal Python

Links:

https://realpython.com/
Start Herehttps://realpython.com/start-here/
Learn Python https://realpython.com/python-namespace/
Your Learning Plan →Your personalized Python learning planhttps://realpython.com/account/learning-plan/
Python Tutorials →In-depth articles and video courseshttps://realpython.com/search?kind=article&kind=course&order=newest&_from=nav_library
Learning Paths →Guided study plans for accelerated learninghttps://realpython.com/learning-paths/
Quizzes & Exercises →Check your learning progresshttps://realpython.com/search?kind=exercise&kind=quiz&_from=nav_library
Browse Topics →Focus on a specific area or skill levelhttps://realpython.com/tutorials/all/
Reference →Concise definitions for common Python termshttps://realpython.com/ref/
Mentor AI →NewYour personal Python mentorhttps://realpython.com/mentor/
Office Hours →Live Q&A calls with Python expertshttps://realpython.com/office-hours/
Community Chat →Learn with other Pythonistashttps://realpython.com/community/
Live Courses →Live, instructor-led Python courseshttps://realpython.com/live/
Books →Round out your knowledge and learn offlinehttps://realpython.com/products/books/
Podcast →Hear what’s new in the world of Pythonhttps://realpython.com/podcasts/rpp/
Unlock All Content and Become a Python Expert →Get unlimited access to all Real Python has to offerhttps://realpython.com/account/join/?from=navbar_learn
Unlock All Content →Become a Python Experthttps://realpython.com/account/join/?from=navbar_learn
More https://realpython.com/python-namespace/
Learner Storieshttps://realpython.com/learner-stories/
Python Newsletterhttps://realpython.com/newsletter/
Python Job Boardhttps://www.pythonjobshq.com
Meet the Teamhttps://realpython.com/team/
Become a Contributorhttps://realpython.com/jobs/
Searchhttps://realpython.com/search
https://realpython.com/search
Joinhttps://realpython.com/account/join/
Sign‑Inhttps://realpython.com/account/login/?intent=navbar&next=%2Fpython-namespace%2F
Browse Topicshttps://realpython.com/tutorials/all/
Guided Learning Pathshttps://realpython.com/learning-paths/
Basicshttps://realpython.com/search?level=basics&_from=sidebar_level
Intermediatehttps://realpython.com/search?level=intermediate&_from=sidebar_level
Advancedhttps://realpython.com/search?level=advanced&_from=sidebar_level
aihttps://realpython.com/tutorials/ai/
algorithmshttps://realpython.com/tutorials/algorithms/
apihttps://realpython.com/tutorials/api/
best-practiceshttps://realpython.com/tutorials/best-practices/
careerhttps://realpython.com/tutorials/career/
communityhttps://realpython.com/tutorials/community/
databaseshttps://realpython.com/tutorials/databases/
data-sciencehttps://realpython.com/tutorials/data-science/
data-structureshttps://realpython.com/tutorials/data-structures/
data-vizhttps://realpython.com/tutorials/data-viz/
devopshttps://realpython.com/tutorials/devops/
djangohttps://realpython.com/tutorials/django/
dockerhttps://realpython.com/tutorials/docker/
editorshttps://realpython.com/tutorials/editors/
flaskhttps://realpython.com/tutorials/flask/
front-endhttps://realpython.com/tutorials/front-end/
gamedevhttps://realpython.com/tutorials/gamedev/
guihttps://realpython.com/tutorials/gui/
machine-learninghttps://realpython.com/tutorials/machine-learning/
newshttps://realpython.com/tutorials/news/
numpyhttps://realpython.com/tutorials/numpy/
projectshttps://realpython.com/tutorials/projects/
pythonhttps://realpython.com/tutorials/python/
stdlibhttps://realpython.com/tutorials/stdlib/
testinghttps://realpython.com/tutorials/testing/
toolshttps://realpython.com/tutorials/tools/
web-devhttps://realpython.com/tutorials/web-dev/
web-scrapinghttps://realpython.com/tutorials/web-scraping/
Table of Contentshttps://realpython.com/python-namespace/#toc
Getting to Know Namespaces in Pythonhttps://realpython.com/python-namespace/#getting-to-know-namespaces-in-python
The Built-in Namespacehttps://realpython.com/python-namespace/#the-built-in-namespace
The Global Namespacehttps://realpython.com/python-namespace/#the-global-namespace
The Local Namespacehttps://realpython.com/python-namespace/#the-local-namespace
The Enclosing or Nonlocal Namespacehttps://realpython.com/python-namespace/#the-enclosing-or-nonlocal-namespace
Understanding the Scope of Nameshttps://realpython.com/python-namespace/#understanding-the-scope-of-names
The LEGB Rule for Searching Nameshttps://realpython.com/python-namespace/#the-legb-rule-for-searching-names
The LEGB Rule in Actionhttps://realpython.com/python-namespace/#the-legb-rule-in-action
Shadowing Built-in Names in Pythonhttps://realpython.com/python-namespace/#shadowing-built-in-names-in-python
Managing Namespace Dictionarieshttps://realpython.com/python-namespace/#managing-namespace-dictionaries
The globals() Functionhttps://realpython.com/python-namespace/#the-globals-function
The locals() Functionhttps://realpython.com/python-namespace/#the-locals-function
The Difference Between globals() and locals()https://realpython.com/python-namespace/#the-difference-between-globals-and-locals
Modifying Variables From a Different Namespacehttps://realpython.com/python-namespace/#modifying-variables-from-a-different-namespace
The global Statementhttps://realpython.com/python-namespace/#the-global-statement
The nonlocal Statementhttps://realpython.com/python-namespace/#the-nonlocal-statement
Conclusionhttps://realpython.com/python-namespace/#conclusion
Frequently Asked Questionshttps://realpython.com/python-namespace/#frequently-asked-questions
https://realpython.com/feedback/survey/article/python-namespace/liked/?from=article-sidebar
https://realpython.com/feedback/survey/article/python-namespace/disliked/?from=article-sidebar
Navigating Namespaces and Scope in Python 44m · 13 lessons https://realpython.com/courses/navigate-namespaces-scope/
Leodanis Pozo Ramoshttps://realpython.com/python-namespace/#author
https://realpython.com/python-namespace/#reader-comments
intermediatehttps://realpython.com/tutorials/intermediate/
pythonhttps://realpython.com/tutorials/python/
Getting to Know Namespaces in Pythonhttps://realpython.com/python-namespace/#getting-to-know-namespaces-in-python
The Built-in Namespacehttps://realpython.com/python-namespace/#the-built-in-namespace
The Global Namespacehttps://realpython.com/python-namespace/#the-global-namespace
The Local Namespacehttps://realpython.com/python-namespace/#the-local-namespace
The Enclosing or Nonlocal Namespacehttps://realpython.com/python-namespace/#the-enclosing-or-nonlocal-namespace
Understanding the Scope of Nameshttps://realpython.com/python-namespace/#understanding-the-scope-of-names
The LEGB Rule for Searching Nameshttps://realpython.com/python-namespace/#the-legb-rule-for-searching-names
The LEGB Rule in Actionhttps://realpython.com/python-namespace/#the-legb-rule-in-action
Shadowing Built-in Names in Pythonhttps://realpython.com/python-namespace/#shadowing-built-in-names-in-python
Managing Namespace Dictionarieshttps://realpython.com/python-namespace/#managing-namespace-dictionaries
The globals() Functionhttps://realpython.com/python-namespace/#the-globals-function
The locals() Functionhttps://realpython.com/python-namespace/#the-locals-function
The Difference Between globals() and locals()https://realpython.com/python-namespace/#the-difference-between-globals-and-locals
Modifying Variables From a Different Namespacehttps://realpython.com/python-namespace/#modifying-variables-from-a-different-namespace
The global Statementhttps://realpython.com/python-namespace/#the-global-statement
The nonlocal Statementhttps://realpython.com/python-namespace/#the-nonlocal-statement
Conclusionhttps://realpython.com/python-namespace/#conclusion
Frequently Asked Questionshttps://realpython.com/python-namespace/#frequently-asked-questions
Remove adshttps://realpython.com/account/join/
Navigating Namespaces and Scope in Pythonhttps://realpython.com/courses/navigate-namespaces-scope/
mappinghttps://realpython.com/ref/glossary/mapping/
variableshttps://realpython.com/python-variables/
functionshttps://realpython.com/defining-your-own-python-function/
inner functionshttps://realpython.com/inner-functions-what-are-they-good-for/
closureshttps://realpython.com/python-closure/
Click here to download the free sample code https://realpython.com/bonus/python-namespaces-scope-code/
https://realpython.com/quizzes/python-namespace/
Namespaces in Pythonhttps://realpython.com/quizzes/python-namespace/
https://realpython.com/python-namespace/#getting-to-know-namespaces-in-python
namespacehttps://realpython.com/ref/glossary/namespace/
dictionaryhttps://realpython.com/python-dicts/
scopehttps://realpython.com/python-namespace/#understanding-the-scope-of-names
The Zen of Pythonhttps://realpython.com/zen-of-python/
modulehttps://realpython.com/ref/glossary/module/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-namespace/#the-built-in-namespace
interpreterhttps://realpython.com/ref/glossary/interpreter/
dir()https://realpython.com/ref/builtin-functions/dir/
argumenthttps://realpython.com/ref/glossary/argument/
built-in exceptionshttps://realpython.com/python-built-in-exceptions/
built-in functionshttps://realpython.com/python-data-types/#built-in-functions
built-in data typeshttps://realpython.com/ref/builtin-types/
https://realpython.com/python-namespace/#the-global-namespace
importhttps://realpython.com/absolute-vs-relative-python-imports/
Defining Main Functions in Pythonhttps://realpython.com/python-main-function/
Python Modules and Packages—An Introductionhttps://realpython.com/python-modules-packages/
REPLhttps://realpython.com/python-repl/
dir()https://realpython.com/python-built-in-functions/#checking-names-and-attributes-dir-and-vars
global variablehttps://realpython.com/ref/glossary/global-variable/
https://realpython.com/python-namespace/#the-local-namespace
NameErrorhttps://realpython.com/python-built-in-exceptions/#name-errors-nameerror
https://realpython.com/python-namespace/#the-enclosing-or-nonlocal-namespace
inner functionhttps://realpython.com/inner-functions-what-are-they-good-for/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-namespace/#understanding-the-scope-of-names
scope in computer programminghttps://en.wikipedia.org/wiki/Scope_(computer_science)
Python Scope & the LEGB Rule: Resolving Names in Your Codehttps://realpython.com/python-scope-legb-rule/
Python Basics: Scopeshttps://realpython.com/courses/python-basics-scopes/
https://realpython.com/python-namespace/#the-legb-rule-for-searching-names
NameErrorhttps://docs.python.org/3/builtins/exceptions.html#NameError
LEGB rulehttps://realpython.com/python-scope-legb-rule/
https://files.realpython.com/media/t.fd7bd78bbb47.png
https://realpython.com/python-namespace/#the-legb-rule-in-action
print()https://realpython.com/python-print/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-namespace/#shadowing-built-in-names-in-python
assignmenthttps://realpython.com/ref/glossary/assignment/
del statementhttps://realpython.com/python-del-statement/
https://realpython.com/python-namespace/#managing-namespace-dictionaries
https://realpython.com/python-namespace/#the-globals-function
is operatorhttps://realpython.com/python-is-identity-vs-equality/#comparing-identity-with-the-python-is-and-is-not-operators
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-namespace/#the-locals-function
https://realpython.com/python-namespace/#the-difference-between-globals-and-locals
shallow copyhttps://realpython.com/ref/glossary/shallow-copy/
https://realpython.com/python-namespace/#modifying-variables-from-a-different-namespace
local variablehttps://realpython.com/ref/glossary/local-variable/
mutablehttps://realpython.com/python-mutable-vs-immutable-types/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-namespace/#the-global-statement
https://files.realpython.com/media/t.0ee0e5dafa9d.png
Using and Creating Global Variables in Your Python Functionshttps://realpython.com/python-use-global-variable-in-function/
SyntaxErrorhttps://realpython.com/invalid-syntax-python/
https://realpython.com/python-namespace/#the-nonlocal-statement
nonlocalhttps://realpython.com/python-keywords/#variable-handling-keywords-del-global-nonlocal
https://files.realpython.com/media/t.b7e3c1b7bd96.png
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-namespace/#conclusion
Click here to download the free sample code https://realpython.com/bonus/python-namespaces-scope-code/
https://realpython.com/python-namespace/#frequently-asked-questions
https://realpython.com/quizzes/python-namespace/
Namespaces in Pythonhttps://realpython.com/quizzes/python-namespace/
https://realpython.com/feedback/survey/article/python-namespace/liked/?from=article-footer
https://realpython.com/feedback/survey/article/python-namespace/disliked/?from=article-footer
Navigating Namespaces and Scope in Pythonhttps://realpython.com/courses/navigate-namespaces-scope/
https://realpython.com/team/lpozoramos/
» More about Leodanishttps://realpython.com/team/lpozoramos/
https://realpython.com/team/asantos/
Aldrenhttps://realpython.com/team/asantos/
https://realpython.com/team/bweber/
Bryanhttps://realpython.com/team/bweber/
https://realpython.com/team/bweleschuk/
Brendahttps://realpython.com/team/bweleschuk/
https://realpython.com/team/bzaczynski/
Bartoszhttps://realpython.com/team/bzaczynski/
https://realpython.com/team/jjablonski/
Joannahttps://realpython.com/team/jjablonski/
https://realpython.com/team/jschmitt/
Jacobhttps://realpython.com/team/jschmitt/
https://realpython.com/team/jsturtz/
Johnhttps://realpython.com/team/jsturtz/
Level Up Your Python Skills »https://realpython.com/account/join/?utm_source=rp_article_footer&utm_content=python-namespace
Level Up Your Python Skills »https://realpython.com/account/join/?utm_source=rp_article_footer&utm_content=python-namespace
https://realpython.com/feedback/survey/article/python-namespace/liked/?from=article-comments
https://realpython.com/feedback/survey/article/python-namespace/disliked/?from=article-comments
LinkedInhttps://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Frealpython.com%2Fpython-namespace%2F
Twitterhttps://twitter.com/intent/tweet/?text=Interesting%20Python%20article%20on%20%40realpython%3A%20Namespaces%20in%20Python&url=https%3A%2F%2Frealpython.com%2Fpython-namespace%2F
Blueskyhttps://bsky.app/intent/compose?text=Interesting%20Python%20article%20on%20%40realpython.com%3A%20Namespaces%20in%20Python%20https%3A%2F%2Frealpython.com%2Fpython-namespace%2F
Facebookhttps://facebook.com/sharer/sharer.php?u=https%3A%2F%2Frealpython.com%2Fpython-namespace%2F
Get tips for asking good questionshttps://realpython.com/python-beginner-tips/#tip-9-ask-good-questions
get answers to common questions in our support portalhttps://support.realpython.com
Real Python Community Chathttps://realpython.com/community/
“Office Hours” Live Q&A Sessionhttps://realpython.com/office-hours/
intermediatehttps://realpython.com/tutorials/intermediate/
pythonhttps://realpython.com/tutorials/python/
Functions and Scopeshttps://realpython.com/learning-paths/functions-and-scopes/?utm_source=realpython&utm_medium=web&utm_campaign=related-learning-path&utm_content=python-namespace
Navigating Namespaces and Scope in Pythonhttps://realpython.com/courses/navigate-namespaces-scope/?utm_source=realpython&utm_medium=web&utm_campaign=related-course&utm_content=python-namespace
Python Scope and the LEGB Rule: Resolving Names in Your Codehttps://realpython.com/python-scope-legb-rule/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python-namespace
Python Modules and Packages – An Introductionhttps://realpython.com/python-modules-packages/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python-namespace
Using Python's .__dict__ to Work With Attributeshttps://realpython.com/python-dict-attribute/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python-namespace
Python Classes: The Power of Object-Oriented Programminghttps://realpython.com/python-classes/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python-namespace
Absolute vs Relative Imports in Pythonhttps://realpython.com/absolute-vs-relative-python-imports/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python-namespace
https://realpython.com/account/signup/?intent=continue_reading&utm_source=rp&utm_medium=web&utm_campaign=rwn&utm_content=v1&next=%2Fpython-namespace%2F
Continue »https://realpython.com/account/signup/?intent=continue_reading&utm_source=rp&utm_medium=web&utm_campaign=rwn&utm_content=v1&next=%2Fpython-namespace%2F
Sign-Inhttps://realpython.com/account/login/?intent=continue_reading&next=/python-namespace/
Start Herehttps://realpython.com/start-here/
Your Learning Planhttps://realpython.com/account/learning-plan/
Browse Topicshttps://realpython.com/tutorials/all/
Learning Resourceshttps://realpython.com/search
Python Referencehttps://realpython.com/ref/
Cheat Sheetshttps://realpython.com/cheatsheets/
Support Centerhttps://support.realpython.com
Mentor AIhttps://realpython.com/mentor/
Learning Pathshttps://realpython.com/learning-paths/
Tutorialshttps://realpython.com/tutorials/
Courseshttps://realpython.com/courses/
Quizzeshttps://realpython.com/quizzes/
Coding Exerciseshttps://realpython.com/coding-exercises/
Live Courseshttps://realpython.com/live/
Bookshttps://realpython.com/books/
Data Sciencehttps://realpython.com/start/data-science-analytics/
AI Apps & Agentshttps://realpython.com/start/ai-apps-agents/
Machine Learninghttps://realpython.com/start/machine-learning/
Automationhttps://realpython.com/start/scripting-automation/
Web Developmenthttps://realpython.com/start/web-development-apis/
Cybersecurityhttps://realpython.com/start/cybersecurity/
Podcasthttps://realpython.com/podcasts/rpp/
Newsletterhttps://realpython.com/newsletter/
Community Chathttps://realpython.com/community/
Office Hourshttps://realpython.com/office-hours/
Learner Storieshttps://realpython.com/learner-stories/
Plans & Pricinghttps://realpython.com/account/join/
Team Planshttps://realpython.com/account/join-team/
For Businesshttps://realpython.com/account/join-team/inquiry/
For Schoolshttps://realpython.com/account/join-team/education-inquiry/
Reviewshttps://realpython.com/learner-stories/
About Ushttps://realpython.com/about/
Teamhttps://realpython.com/team/
Mission & Valueshttps://realpython.com/mission/
Editorial Guidelineshttps://realpython.com/editorial-guidelines/
Sponsorshipshttps://realpython.com/sponsorships/
Careershttps://realpython.workable.com
Press Kithttps://realpython.com/media-kit/
Merchhttps://realpython.com/merch
https://www.youtube.com/realpython
https://x.com/realpython
https://www.linkedin.com/company/realpython-com
https://www.facebook.com/LearnRealPython
https://github.com/realpython/
Privacy Policyhttps://realpython.com/privacy-policy/
Terms of Usehttps://realpython.com/terms/
Securityhttps://realpython.com/security/
Contacthttps://realpython.com/contact/
https://realpython.com/

Viewport: width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover

Robots: max-image-preview:large


URLs of crawlers that visited me.