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