擅长:python、mysql、java
<p>如果使用<a href="https://docs.python.org/3.4/library/stdtypes.html#str.format" rel="nofollow noreferrer">^{<cd1>}</a>,可以更好地控制参数间的间距(print使用默认的单个空格):</p>
<pre><code>print("The text contains {} alphabetic characters\
of which {} ({}%) are 'e'.".format(totalChars, numberOfe, percent_with_e))
</code></pre>