语法错误:非ASCII字符'\ xe2

时间:2020-07-29 10:11:15

标签: python python-2.7

我收到此错误:

SyntaxError: Non-ASCII character '\xe2

运行以下代码时:

verse = "If you can keep your head when all about you\n  Are losing theirs and blaming it on you,\nIf you can trust yourself when all men doubt you,\n  But make allowance for their doubting too;\nIf you can wait and not be tired by waiting,\n  Or being lied about, don’t deal in lies,\nOr being hated, don’t give way to hating,\n  And yet don’t look too good, nor talk too wise:"
  
print(verse)

我正在使用python 2.7并包含# -*- coding: utf-8 -*-

0 个答案:

没有答案