加入if name == ‘main’:即可 文章目录 error显示修改前程序修改方法修改后程序其他经典方法 error显示 修改前程序 修改方法 加入if __name__ == '__main__': 修改后程序 即可 其他经典方法 传送门