<p>当我读<a href="https://learnpythonthehardway.org/book/ex24.html" rel="nofollow noreferrer">this</a></p>
<p>有这个密码的</p>
<pre><code>We can also do that this way:
We'd have 500000 beans, 500 jars, and 5 crates.
</code></pre>
<p>当我改成政治公众人物498的时候</p>
<pre><code>print ("We can also do that this way:")
print (f"We'd have {secret_formula(start_point)} beans, {secret_formula(start_point)} jars, and {secret_formula(start_point)} crates.")
</code></pre>
<p>它打印这个</p>
<pre><code>We can also do that this way:
We'd have (500000, 500, 5) beans, (500000, 500, 5) jars, and (500000, 500, 5) crates.
</code></pre>
<p>我想把这段代码改成f-string
<code>
print "We can also do that this way:"
print "We'd have %d beans, %d jars, and %d crates." % secret_formula(start_point)
</code></p>