擅长:python、mysql、java
<p>正如@hpaulj所指出的,您的问题源于shell和工作方式。您的选择是使用您得到的转义字符来处理字符串。</p>
<p>看看下面的答案:
<a href="https://stackoverflow.com/questions/4020539/process-escape-sequences-in-a-string-in-python">Process escape sequences in a string in Python</a>
. 基本上,使用<code>string_escape</code>或<code>unicode_escape</code>来处理字符串。这比用手处理你的绳子好。</p>