Toptube Video Search Engine



Title:Why You Should Use Python if __name__ == "__main__"
Duration:05:26
Viewed:21,146
Published:08-03-2022
Source:Youtube

In this video, I show you how and why you should always use if __name__ == '__main__' in python and answer the question of why there is no Python main function. Additionally, you will see how to prevent Python modules from executing using Python __main__. ⏬ Python Cheat Sheets: https://k0nze.gumroad.com 👉 Website Article for this Video: https://k0nze.dev/posts/python-name-main 💌 Support me on Patreon: https://patreon.com/k0nze ☕️ Buy me Coffee: https://www.buymeacoffee.com/k0nze 🌍 Check out my Website: https://k0nze.dev 💻 Join our Discord: https://discord.k0nze.dev 👔 Follow me on LinkedIn: https://linkedin.k0nze.dev Recording Gear Camera - Sony A6400: https://geni.us/zRw1 Lens - Viltrox AF 23mm f1.4: https://geni.us/RVrguGd Microphone - Rode Wireless Go: https://geni.us/RBAOIx Keyboard - Keychron K2 v2: https://geni.us/DPK87Xn ⏰ Timestamps: 0:00 Intro 0:17 Python does not have a main function 0:45 How does the Python interpreter work? 2:13 Prevent Python import from execution 2:33 Python __name__ 4:14 Summary



SHARE TO YOUR FRIENDS


Download Server 1


DOWNLOAD MP4

Download Server 2


DOWNLOAD MP4

Alternative Download :