擅长:python、mysql、java
<p>在Python2中:</p>
<pre><code>data = [3, 4]
for x in data:
print x, # notice the comma at the end of the line
</code></pre>
<p>或者在Python3中:</p>
<pre><code>for x in data:
print(x, end=' ')
</code></pre>
<p>印刷品</p>
<pre><code>3 4
</code></pre>