在pycharm中的python文件中输入中文会报错SyntaxError:
问题解决方法在文件开头添加 :
# -*- coding:utf-8 -*-
每次添加都很麻烦,一劳永逸解决此问题的方法:
file-->setting-->editor-->File and Code Templates-->Python Script 添加:
#oding = utf-8
# -*- coding:utf-8 -*-
点击OK
原文:http://www.cnblogs.com/justdo-it/p/5248416.html