1.打开pycharm 2.点击file——>settings 3.editor——>File and Code Templates——>Python Script——>编写注释——>OK 4.创建一个新的python file 完成!