擅长:python、mysql、java
<p>如果在语句末尾添加逗号(<code>,</code>),则将省略换行符:</p>
<pre><code>print ('%10d %10s') % (value1, value2),
</code></pre>
<p>来自<a href="http://docs.python.org/reference/simple_stmts.html#print">http://docs.python.org/reference/simple_stmts.html#print</a>:</p>
<blockquote>
<p>A <code>'\n'</code> character is written at the end, unless the <code>print</code> statement ends with a comma. This is the only action if the statement contains just the keyword <code>print</code>.</p>
</blockquote>