1.编码问题 Python代码头部应写# -*- coding: UTF-8 -*- 此代码意思本文件一律采用utf-8编码,包括注释。 2.测试说明 经测试,如果不写,当运行python文件时,只要有中文就报错:SyntaxError: Non-ASCII character '\xe5' in file D:/project_python/my-python/TestCoding.py on line 2, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details