麻烦老师帮我看一下这个错误出在哪里
来源:6-10 常量与Pylint的规范

weixin_慕盖茨041423
2019-02-28
ACCOUNT = 'circle'
# 形式上的常量要全部大写
password = '123456'
print('please input ACCOUNT')
user_account = input()
print('please input password')
user_password = input()
if ACCOUNT==user_account and password==user_password:
print('succeed')
else:
print('fail')
File "test.py", line 2
SyntaxError: Non-ASCII character '\xe5' in file test.py on line 2, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
然后我也没法再从头修改了,第一行一回车就进入了第二行,没有再增加行
写回答
2回答
-
慕粉916768
2019-08-11
print('fail')
这行最开始处有一个非ASCII字符,把else语句删除重新写就可以了。
00 -
7七月
2019-03-01
没太明白。什么意思?
042019-03-02
相似问题