擅长:python、mysql、java
<p>你看错了API</p>
<p><a href="http://docs.python.org/library/re.html#re.sub" rel="noreferrer">http://docs.python.org/library/re.html#re.sub</a></p>
<p>在图案.sub(repl,字符串[,count])¶</p>
<pre><code>r.sub(x, "blue")
# should be
r.sub("blue", x)
</code></pre>