1、修改字符编码格式
【file】===>【setting】==> 【editor] ===> 【file encodings】设置为utf-8
2、修改python文件的默认编码格式
【file】===>【setting】==> 【editor] ===> 【file and code templates】然后点击Pyhon Script 添加一下内容
#-*-coding:utf-8-*-
这样pycharm会自动在每个新建的py文件前添加字符格式规则
1、修改字符编码格式
【file】===>【setting】==> 【editor] ===> 【file encodings】设置为utf-8
2、修改python文件的默认编码格式
【file】===>【setting】==> 【editor] ===> 【file and code templates】然后点击Pyhon Script 添加一下内容
#-*-coding:utf-8-*-
这样pycharm会自动在每个新建的py文件前添加字符格式规则