擅长:python、mysql、java
<p>请查看<a href="http://wiki.python.org/moin/PythonSpeed/PerformanceTips#String_Concatenation" rel="nofollow">Python performance tips</a>以获得有关字符串连接的建议。你知道吗</p>
<blockquote>
<p>Avoid:</p>
<pre><code>out = "<html>" + head + prologue + query + tail + "</html>"
</code></pre>
<p>Instead, use</p>
<pre><code>out = "<html>%s%s%s%s</html>" % (head, prologue, query, tail)
</code></pre>
</blockquote>