Jun-02-2019, 09:17 PM
(Jun-02-2019, 09:13 PM)perfringo Wrote: There is Format Specification Mini-Language.
If using 3.6 < Python then f-strings are way to go:
>>> food_charge = 11.99 >>> sales_tax = food_charge * 0.08 >>> print(f'The sales tax is ${sales_tax:.2f}') The sales tax is $0.96
ur amazing, and it was in my notes the entire time and I completely looked over or did something weird with it. thank you!