demo_string_formatting4.py:
quantity = 3 itemno = 567 price = 49 myorder = "I want {0} pieces of item number {1} for {2:.2f} dollars." print(myorder.format(quantity, itemno, price))
C:\Users\My Name>python demo_string_formatting4.py
I want 3 pieces of item number 567 for 49.00 dollars.