
上QQ阅读APP看书,第一时间看更新
The str.format() method
The format() method enables formatting the string using braces ({}) as placeholders. In the preceding example, we use total as a placeholder and use the format method of the string class to fill each place holder.