prices = ['31', '32']
txt = "For only {price:.2f} dollars!"
for i in prices:
print(txt.format(prices))
Im trying this to get : For only 31.00 dollars For only 32.00 dollars but am facing this issue. Please help, Im a noob
prices = ['31', '32']
txt = "For only {price:.2f} dollars!"
for i in prices:
print(txt.format(prices))