SyntaxError: Non-ASCII character '\xe8' in file 1.py on line 1, but no encoding declared;

错误提示:

SyntaxError: Non-ASCII character '\xef' in file 1.py on line 12, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details


在Linux执行python语句:

[root@zhuhaiyan ~]# python 1.py
#encoding:utf-8          -----------------------------------缺少此行将会导致以上的错误
n = int(input("请输入数据"))
if n<100:
    print("符合要求")
else:
    print("不符合要求")
print("end")


你可能感兴趣的:(Python初级挑战高级)