Result Size: 625 x 571
demo_string_formatting2.py:
x
 
price = 49
txt = "The price is {:.2f} dollars"
print(txt.format(price))
C:\Users\My Name>python demo_string_formatting2.py
The price is 49.00 dollars