if __name__ == '__main__' 在 Python 程序中,我们会经常看到在代码中有这样的语句, if __name__ == "__main__": xxxxxx 而且一般都是在代码的最后面出现。