I want to add the variable price
into the string txt
.
price = 49
txt = "The price is ${}!"
print(txt.format(txt(price)))
I want it to insert it into the {}
s. An error comes out saying
Traceback (most recent call last):
File "C:\Users\kianc\OneDrive\Desktop\stck\this.py", line 3, in <module>
print(txt.format(txt(price)))
TypeError: 'str' object is not callable
and I don't know how to fix this! Any help would be great! :D