python name equals code example Example 1: explained if name main python python foo.py Example 2: __name__ == '__main__' if __name__ == "__main__": main()