Title | : | If __name__ == "__main__" for Python Developers |
Duration | : | 08:47 |
Viewed | : | 383,648 |
Published | : | 27-11-2022 |
Source | : | Youtube |
If name equals main - then we run our programs! But do we actually understand what is __name__ , what is __main__ and most of all - why do we need to check if they match? 🤔🤔🤔 I've prepared this very special tutorial that dives deep into each component and demonstrates it thorough simple code examples. By the end of this video - you'll be able to explain this expression in your own words (!!!) as well as other terms like "module" and even "top level code" 😉 ⏰ TIME STAMPS ⏰ ------------------------------------------ 00:00 - Intro 00:29 - What is __name__ 00:59 - What is module? 01:34 - Top level code vs imported code 03:35 - What is __main__ 05:08 - Find the value of __name__ 05:55 - Why do we need to check if name == main 08:08 - Thanks for watching! 🤝 Connect with me 🤝 -------------------------------------- 🔗 Github: https://github.com/mariyasha 🔗 Discord: https://discord.com/invite/wgTTmsWmXA 🔗 LinkedIn: https://ca.linkedin.com/in/mariyasha888 🔗 Twitter: https://twitter.com/mariyasha888 🔗 Blog: https://www.pythonsimplified.org 🎯 Sources 🎯 -------------------------------------- ⭐ Python Documentation: https://docs.python.org/3/library/__main__.html 💳 Credits 💳 ---------------------- ⭐ Beautiful animated graphics by: mixkit.co ⭐ Beautiful icons by: flaticon.com #python #pythonprogramming #python3 #pythonforbeginners #if #main #coding #programming #pythontutorial #conditioning #pythonsimplified #module #toplevel #code
![]() |
Much Faster Pandas with cuDF GPU Processing - C... 19:57 - 32,857 |
![]() |
5 Good Python Habits 17:35 - 402,926 |
![]() |
Python Classes and Objects - OOP for Beginners 08:01 - 536,201 |
![]() |
Learn Python in 15 Minutes || introduction to b... 17:55 - 5,373 |
![]() |
5 Signs of an Inexperienced Self-Taught Develop... 08:40 - 601,613 |
![]() |
Portugal – Slowenien Highlights | Achtelfinal... 09:07 - 1,008,448 |
![]() |
Python Tutorial: if name == ' main ' 08:43 - 2,048,083 |
![]() |
You should put this in all your Python scripts ... 07:32 - 1,399,722 |