python生成器代码报错 新手求解答?
0
g = (x * x for x in range(10))
for n in g:
print n
File "C:/Users/Administrator/PycharmProjects/untitled4/test5.py", line 1
SyntaxError: Non-ASCII character '\xe7' in file
C:/Users/Administrator/PycharmProjects/untitled4/test5.py on line 1, but no encoding declared; see PEP 263 -- Defining Python Source Code Encodings for details
Process finished with exit code 1
没有找到相关结果
重要提示:提问者不能发表回复,可以通过评论与回答者沟通,沟通后可以通过编辑功能完善问题描述,以便后续其他人能够更容易理解问题.
1 个回复
Jason_Huang 2017-04-07 回答
赞同来自: