Python: if __name__ == ‘__main__’ April 5, 2015 by Corey Schafer Leave a Comment 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. Share this:FacebookTwitterRedditPinterestTumblrLinkedInPocketEmailPrint Related