Recently developed and learned Pyton, when adding Chinese comments, the running program reports an error:
File "red.py", line 10 SyntaxError: Non-ASCII character '\xe5' in file red.py on line 10, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
Solution:
Add a sentence to the first or second line of the Python script file:
#coding:gbk or #coding:utf - 8 or ##-*- coding : gbk -*-