主页
Python
Python String format() 方法
demo_string_placeholder10
运行 ❯
×
更改方向
保存代码
更改主题
#Use "b" to convert the number into binary format: txt = "The binary version of {0} is {0:b}" print(txt.format(5))
The binary version of 5 is 101