Python之中文识别
若python文件中出现中文字符,运行时会出现如下错误
SyntaxError: Non-ASCII character '\xd5' in file sort.py on line 2, but no encodi
ng declared; see http://www.python.org/peps/pep-0263.html for details
可以在python的文件开始处加入下面声明即可fix这个error
# -*- coding: gbk -*
Work for fun,Live for love!