filmov
tv
If __name__ == '__main__' (with animations) Python Tutorial

Показать описание
In this video we will look at the
ubiquitous yet mysterious line of code, If __name__ == "__main__" that pops up in many Python scripts. When I first started, I was wondering why we use __name__ == __main__. If __name__ == "__main__" is actually a way to check if your script is a script or module. If you don't understand that, don't worry, everything is explained in the video.
In this video, we will learn with clear examples why we use if __name__ == "__main__", what each of the components (__name__) and __main__ mean,
I give clear examples with animations to show what this line means,
as well as how to and when to use it and you should hopefully leave this video with a full grasp of the meaning behind the mysterious statment:
if __name__ == "__main__"
You can find the notebook here in my Python stuff repository (or can be found eventually):
ubiquitous yet mysterious line of code, If __name__ == "__main__" that pops up in many Python scripts. When I first started, I was wondering why we use __name__ == __main__. If __name__ == "__main__" is actually a way to check if your script is a script or module. If you don't understand that, don't worry, everything is explained in the video.
In this video, we will learn with clear examples why we use if __name__ == "__main__", what each of the components (__name__) and __main__ mean,
I give clear examples with animations to show what this line means,
as well as how to and when to use it and you should hopefully leave this video with a full grasp of the meaning behind the mysterious statment:
if __name__ == "__main__"
You can find the notebook here in my Python stuff repository (or can be found eventually):
Add THIS To Your Python Scripts! if __name__ == '__main__'
Python Tutorial: if __name__ == '__main__'
If __name__ == '__main__' for Python Developers
You should put this in all your Python scripts | if __name__ == '__main__': ...
Python if __name__ == '__main__' ❓
14. if __name__ == '__main__' [Python 3 Programming Tutorials]
Вы должны использовать это в Python | if __name__ == '__main__' (Все фишки и ошибки конст...
What does if __name__ == '__main__' do in Python?
if __name__ == '__main__' for Python beginners 📥
Для чего нужна строка if __name__ == '__main__' в Python?
Python с нуля | if __name__ == '__main__' | Зачем? И почему нужно использовать...
if __name__ == '__main__' in Python | Python Tutorial - Day #45
#46 Python Tutorial for Beginners | Special Variable __name__
If __name__ == '__main__' for Python Beginners
Python IF NAME == MAIN einfach erklärt! 💡 | Tutorial für Anfänger (Deutsch)
Always use: if __name__ == '__main__': ... in Python
Для чего в Python if __name__ == '__main__' ?
O que Significa if __name__ == '__main__' no Python?
What Does __name__ == '__main__' Mean? #python #coding #programming
Python с нуля. Зачем нужен if __name__ == '__main__'. Как это работает?!...
Python Tutorial: if __name__ == '__main__'
if __name__=='main' for python
Understanding if __name__ == “__main__” in Python | Python Main Function with Examples
Конструкция __MAIN__ для чего и кому нужна.
Комментарии