擅长:python、mysql、java
<p>使用<a href="http://docs.python.org/2/reference/expressions.html#list-displays" rel="nofollow">list comprehension</a>:</p>
<pre><code>In [1]: a = [1,2,3,4]
In [2]: ["hello" + str(x) for x in a]
Out[2]: ['hello1', 'hello2', 'hello3', 'hello4']
</code></pre>