Python 3 globals() built-in function TUTORIAL

preview_player
Показать описание
Tutorial on how to use the globals() built-in function from the Python 3 Standard Library.

📖 You can check out the Udemy course (Python Built-in Functions) here:

Documentation:

⚙️ Recommended Computer Gear:

✈️ Recommended Digital Nomad Gear:
Рекомендации по теме
Комментарии
Автор

Thank you for the video. I am grateful for your time and contribution. Kind regards, Akira.

akira_asahi
Автор

really useful when it comes to make you code dry
when you need to make a lot of if statements
you can just use this: globals()[f"var{i]"]
in a for i in range() loop

beelzebub