擅长:python、mysql、java
<p>在Python 2中,<code>print</code>是print语句中使用的关键字。在Python 3中,<code>print</code>是一个函数名,与任何其他函数一样使用。</p>
<p>尤其是,<code>print</code>需要在其参数列表周围加上括号:</p>
<pre><code> print ("The var is %d" %(var))
</code></pre>
<p>参考号:<a href="http://docs.python.org/3.0/whatsnew/3.0.html#print-is-a-function" rel="nofollow">http://docs.python.org/3.0/whatsnew/3.0.html#print-is-a-function</a></p>