python
_時_
这个作者很懒,什么都没留下…
展开
-
Non-ASCII character '\xe8' in file
SyntaxError: Non-ASCII character '\xe8' in file ./list.py on line 6, but no encoding declared; see h原创 2014-11-05 14:10:54 · 16629 阅读 · 0 评论 -
NameError: name 'commands' is not defined
python 运行时出现错误:NameError: name 'commands' is not defined原因没有导入命令 commands解决方法:import commands原创 2015-02-05 16:59:02 · 4398 阅读 · 0 评论 -
python中range()函数用法
range 范围是左闭右开区间,range(i,j) 相当于 [i,j)。编程时要注意边界问题>>> for i in range(6,12): print(i) 67891011原创 2015-04-09 14:24:44 · 9182 阅读 · 0 评论 -
SyntaxError: Non-ASCII character '\xe6'
python 注释或者代码中有中文时,会报以下错误:SyntaxError: Non-ASCII character '\xe6' in file fibonacci.py on line 3, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details建议是在http://w原创 2015-04-09 14:53:58 · 11101 阅读 · 0 评论