error on if _name_=='-main_': code example Example 1: if __name__ == '__main__' if __name__ == "__main__": Example 2: explained if name main python python foo.py