You could absolutely implement something more interesting and something even more animated like we saw on Wednesday or even earlier today, but it takes a little more than just a format string.
你绝对可以实施一些更有用的,和一些更愉快的东西,像我们周三或今天早些时候,看到的,但它不只是,格式化字符串。
And it boils down to modifying the format string with just a simple number.
它归结于是用一个简单的数字来,修改字符串的格式。
So this is a so-called format string.
这就是所谓的字符串格式。
Glancing at the bottom, this is pretty arbitrary, but I chose to format my string as follows: % 1f so at the bottom here I'm printing out %.1f, which quick sanity check means print just one digit after the decimal place.
看下这个底部,这个是相当随意的,但我选择把我的字符串格式化成这样:,所以在这个底部我打印输出,提醒一下,这是一个只打印出,小数点后一位的方法。
应用推荐