创建pycharm的自定义python模板方法 在pycharm上依次选择打开File->settings->Editor->FileandCodeTemplates->PythonScript复制以下模板 python模板