【发布时间】:2016-06-27 08:27:03
【问题描述】:
str="First of all this isn’t one persons opinion, I promise you this is the worst movie ever. I feel like the other people saw a completely different movie. It starts off with a scene that would terrify any child 9 or under and only goes downhill from there. It’s about this kid named Norman that can talk to ghost or something. His weird and very unfunny uncle can also see ghost and warns him about some witches curse and zombies that are coming. I left after the zombies appeared because I couldn’t take any more of this awful movie. The movie was awful, but then the preview Frankenweenie came on and that looked awesome. I'm usually not a fan of Tim Burton but this looks really good. Do not see Paranorman!"
这是我的输入字符串。然而,Python 将其更改为当我 print str
First of all this isn\xe2\x80\x99t one persons opinion, I promise you this is the worst movie ever. I feel like the other people saw a completely different movie. It starts off with a scene that would terrify any child 9 or under and only goes downhill from there. It\xe2\x80\x99s about this kid named Norman that can talk to ghost or something. His weird and very unfunny uncle can also see ghost and warns him about some witches curse and zombies that are coming. I left after the zombies appeared because I couldn\xe2\x80\x99t take any more of this awful movie. The movie was awful, but then the preview Frankenweenie came on and that looked awesome. I'm usually not a fan of Tim Burton but this looks really good. Do not see Paranorman!
如何将 "\xe2\x80\x99t" 解析为 ’ ?
【问题讨论】:
-
我运行了它,它没有提供任何那种ideone.com/MoAv6v
-
请查看问题中的图片
-
你可能使用的是python3,你看到的是unicode。
-
我正在使用 Python 2.7.11 和 Anaconda
-
好吧,我不知道,但和这里一样:stackoverflow.com/questions/27996448/…
标签: python-2.7