擅长:python、mysql、java
<p>字符串连接这里是你的朋友!与其有一个非常大的打印声明,不如尝试这样的方法:</p>
<pre><code>print_str = ''
if quarters > 0:
print_str += 'You have ' + str(quarters) + ' quarters.'
</code></pre>
<p>然后,在最后,打印出你的指纹</p>
<p>请注意,您可能希望在字符串中有换行符。我建议你在这里阅读字符串:<a href="http://www.tutorialspoint.com/python/python_strings.htm" rel="nofollow">http://www.tutorialspoint.com/python/python_strings.htm</a></p>