解决:Pycharm中设置py文件默认头部 步骤:打开File—>Settings—>Editor—>Code Style—>File and Code Templates—>Files—>Python Script,填入模板,点击apply