pycharm 中快速输入如下主函数方法

if __name__ == '__main__':

直接打main,回车即可自动生成

更多推荐

Python 中快速输入main函数方法