📜  fstring数字格式python代码示例

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

代码示例1
num = 10.4999
print(f"The formatted number is {num:.2f}")
# output: The formatted number is 10.49