📜  python如何使整数显示2个数字 - Python代码示例

📅  最后修改于: 2022-03-11 14:45:27.568000             🧑  作者: Mango

代码示例1
print("{:0*number of characters here*d}".format(my_integer))

# Example with two characters, one of which is a leading zero
print("{:02d}".format(2))