主页
Python
Python String format() 方法
demo_string_placeholder8
运行 ❯
×
更改方向
保存代码
更改主题
#Use "," to add a comma as a thousand separator: txt = "The universe is {:,} years old." print(txt.format(13800000000))
The universe is 13,800,000,000 years old.