主页
Python
Python String format() 方法
demo_string_placeholder14
运行 ❯
×
更改方向
保存代码
更改主题
#Use "E" to convert a number into scientific number format (with an upper-case E): txt = "We have {:E} chickens." print(txt.format(5))
We have 5.000000E+00.