主页
Python
Python String format() 方法
demo_string_placeholder21
运行 ❯
×
更改方向
保存代码
更改主题
#Use "X" to convert the number into upper-case Hex format: txt = "The Hexadecimal version of {0} is {0:X}" print(txt.format(255))
The Hexadecimal version of 255 is FF