Make sure to put this in all your Python scripts | if __name__ == '__main__'

Опубликовано: 24 Май 2026
на канале: Bodan Labs
124
12

This video shows you what name == "__main__" is and why it's useful.

🐍 Video Materials 🐍
__name__: https://docs.python.org/3/library/__m...
upper(): https://docs.python.org/3/library/std...
Source Code: https://github.com/bodanLabs/__name__

🌐 Social Media & Contact 🌐
📱 Website: https://bodanlabs.com/
📷 Instagram: in progress
🐦 Twitter:   / bodanlabs  
📁 GitHub: https://github.com/bodanLabs
🎙 Discord: in progress
🎬 TikTok:   / bodanlabs  

⭐️ Chapters ⭐️
0:00 Introduction
0:10 Writing the function
1:51 Importing example module
3:17 Using _name_ variable
6:10 Outro

⭐️ Tags ⭐️
__name__
name function
__name__ == '__main__'
python learning
python tutorials
special variable _name_
python modules
main function

⭐️ Hashtags ⭐️
#python #main #name #pythonprogramming #pythontutorial #python3 #__name__ #__main__ #coding #programming #pythonprogramming