📜  如何在python代码示例中将整数格式化为两位数

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

代码示例2
You can achieve this using formatted string
num = 1
number = f"{num:02}"
--------------
output:
"01"