Skip to content

python无法支持汉字

报错

Non-ASCII character '\xe6' in file <stdin> on line 9, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

文件开头加上这一行

# -*- coding: utf-8 -*-