TGViewer
PyNotes PyNotes @py_notes_uz · 207 subscribers
Post #110 691
#python
when we import a module(python file), python interpretator searches for that module name in sys.modules.
If it returns False, it will create a new module object and add to sys.modules and then code inside module is executed.

📌 Therefore, when we import the same module several times in one file, it is executed only once.
More from @py_notes_uz
  1. Sep 10, 2026👋 Accepted AI Men sizga orzuingizdagi ishga qabul qilinishda yordam beraman: 📊 CV'ingizn…
  2. May 5, 2026Middle/Senior Full Stack (Python+TypeScript) | Sigma Software Qualifications • 6+ years of…
  3. Apr 16, 2026🇺🇿 o'zbek tilida 🇷🇺 на русском AI Incubator 2026 — Applications Open 🚀 Launch your AI…
  4. Mar 24, 2026Want to learn how AI agents are built at Yandex? The Yandex School of Data Analysis is run…
  5. Feb 17, 2026💡 Python bo'yicha ko'nikmalaringizni sanoat standartlari darajasiga oshirishni va mutaxas…
  6. Jan 22, 2026Why default argument [] dangerous in Python? e.g def add_item(item, items=[]) In Python, d…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →