demo_ref_string_format.py:
txt = "For only {price:.2f} dollars!" print(txt.format(price = 49))
C:\Users\My Name>python demo_string_format.py
For only 49.00 dollars!