Python for beginners tutorial 19 : Scopes and Namespaces in Python

Опубликовано: 02 Январь 2025
на канале: DataScience RoadMap
135
12

A namespace is a mapping from names to objects implemented as dictionaries in Python (i.e unique name for each and every object).
Namespaces are created at different moments and have different lifetimes.
A scope is a textual region of a Python program where a namespace is directly accessible.
A lifetime of a namespace depends upon the scope of objects, if the scope of an object ends, the lifetime of the namespace also ends.

We have four types of scopes and namespaces:
Local
Enclosed
Global
Built-in

Python for beginners tutorial in english
learn Python
Python course

Coursera plus - with Coursera plus, you will have unlimited access to 7,000+ world-class courses, hands-on projects, and job-ready certificate programs—all included in your subscription including popular Professional Certificates from Google and Meta : https://imp.i384100.net/Or95Yn


Data Science Path:

1. Data Science Math skills - Duke University: https://imp.i384100.net/3e9Okd

2. Inferential Statistics - Duke University: https://imp.i384100.net/4PrKao

3. IBM Data Analyst: https://imp.i384100.net/NkQPG2

4. Python for Everybody: https://imp.i384100.net/y2eLZW

5. Data Science Specialization - Johns Hopkins University: https://imp.i384100.net/9gM2D0

6. IBM Data Science: https://imp.i384100.net/LXxgBL

7. Machine Learning Specialization: https://imp.i384100.net/NkQPJv

8. Deep Learning Specialization: https://imp.i384100.net/Kjq9GA

9. MLOps Specialization: https://imp.i384100.net/q4ENvj

10. DeepLearning.AI TensorFlow Developer: https://imp.i384100.net/9gMQZ0

11. TensorFlow Advanced Techniques: https://imp.i384100.net/rQzby5

13. TensorFlow Data & Deployment Specialization: https://imp.i384100.net/PyrkgX

14. Natural Language Processing Specialization: https://imp.i384100.net/k0abvn

15. AWS Fundamentals: https://imp.i384100.net/eKrB2D

16. Practical Data Science on AWS: https://imp.i384100.net/q4ENv5



Get certified from Google:

1. Google Data Analytics: https://imp.i384100.net/xk2bvA

2. Google Business Intelligence: https://imp.i384100.net/QyNedP

3. Google Advanced Data Analytics: https://imp.i384100.net/rQzbNQ


Get certified from Meta:

Meta Database Engineer: https://imp.i384100.net/jrn26e


Disclosure:
I may receive a commission if you click on and purchase from one of the links above.