源代码
txt = "For only {price:.2f} dollars!" print(txt.format(price = 49))
运行结果