demo_ref_string_format.py:
txt = "For only {price:.2f} dollars!" print(txt.format(price = 49))
➜ begtut>python demo_string_format.py
For only 49.00 dollars!