擅长:python、mysql、java
<p>问题是<code>\a</code>和<code>\b</code>在Python字符串文本中有<a href="http://docs.python.org/reference/lexical_analysis.html" rel="nofollow noreferrer">special meaning</a>。</p>
<p>我建议在字符串中嵌入反斜杠时使用<a href="https://docs.python.org/3/reference/lexical_analysis.html#literals" rel="nofollow noreferrer">raw strings</a>:</p>
<pre><code>r'$ \alpha $'
</code></pre>