程序输入中文注释时,出现此类问题
SyntaxError: Non-UTF-8 code starting with '\xbb' in file F:/code/python/mypro01/myexceptiontest01.py on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
解决办法:
在上方添加
#coding=utf-8
程序输入中文注释时,出现此类问题
SyntaxError: Non-UTF-8 code starting with '\xbb' in file F:/code/python/mypro01/myexceptiontest01.py on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
解决办法:
在上方添加
#coding=utf-8