擅长:python、mysql、java
<p>在我看来,froadie的简单连接对于像您这样的简单案例来说是很好的。如果要组合多个字符串,则<a href="http://docs.python.org/library/stdtypes.html#str.join" rel="noreferrer">string join</a>方法似乎是首选方法:</p>
<pre><code>the_text = ''.join(['the ', 'quick ', 'brown ', 'fox ', 'jumped ', 'over ', 'the ', 'lazy ', 'dog.'])
</code></pre>
<p>编辑:注意join需要一个iterable(例如list)作为它的单个参数。</p>