<p>问题可能是按enter键而不是打印结果。这将调用<strong>repr</strong>而不是<strong>str</strong>。引用文件:</p>
<blockquote>
<p>In the interactive interpreter, the output string is enclosed in quotes and special characters are escaped with backslashes. While this might sometimes look different from the input (the enclosing quotes could change), the two strings are equivalent.
<a href="https://docs.python.org/2/tutorial/introduction.html#strings" rel="nofollow noreferrer">reference</a></p>
</blockquote>
<p>让我给你看看:</p>
<pre><code>In [1]: mcd = [u'Chicken saut\xc3\xa9ed potatoes', 'Roasted lamb with mash potatoes', 'Rabbit casserole with tarragon, mushrooms and dijon mustard sauce. Served with mash potatoes']
In [2]: mcd[0]
Out[2]: u'Chicken saut\xc3\xa9ed potatoes'
In [3]: print repr(mcd[0])
u'Chicken saut\xc3\xa9ed potatoes'
In [4]: print mcd[0] # Here will use my current OS encoding, i think utf8 in my case
Chicken sautéed potatoes
In [5]: print mcd[0].encode('utf8') # yes! i was right
Chicken sautéed potatoes
</code></pre>
<p>你应该先选择编码类型,我想在这种情况下你必须使用拉丁语1:</p>
^{pr2}$
<p>希望能帮上忙。在</p>
<p>编辑:
我没有看到问题的编辑,如果你想替换字符,<a href="https://stackoverflow.com/a/1207479/2047185">check this answer</a></p>