HDTutorial
EN

Playback starts YouTube’s embedded player (privacy-enhanced mode).

Python Tutorial: if __name__ == '__main__'

2,125,145 views November 13, 2015 8:43

Watch on YouTube
ChannelCorey Schafer

Description from the creator

In this video, we will take a look at a common conditional statement in Python:
if __name__ == '__main__':

This conditional is used to check whether a python module is being run directly or being imported.


✅ Support My Channel Through Patreon:
patreon.com/coreyms

✅ Become a Channel Member:
youtube.com/channel/UCCezIgC97PvUuR4_gbFUs5g/jo…

✅ One-Time Contribution Through PayPal:
goo.gl/649HFY

✅ Cryptocurrency Donations:
Bitcoin Wallet - 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet - 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet - MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot

✅ Corey's Public Amazon Wishlist
a.co/inIyro1

✅ Equipment I Use and Books I Recommend:
amazon.com/shop/coreyschafer

▶️ You Can Find Me On:
My Website - coreyms.com/
My Second Channel - youtube.com/c/coreymschafer
Facebook - facebook.com/CoreyMSchafer
Twitter - twitter.com/CoreyMSchafer
Instagram - instagram.com/coreymschafer/

#Python

About this tutorial

Corey Schafer published this 8:43 video tutorial on November 13, 2015. It has been watched 2,125,145 times on YouTube.

Category
Education
Duration
8:43
Published
November 13, 2015
Views
2,125,145
Likes
58,107

Tags

Share

This tutorial in other languages