主页
Python
Python 字符串
demo_string_format2
运行 ❯
×
更改方向
保存代码
更改主题
quantity = 3 itemno = 567 price = 49.95 myorder = "I want {} pieces of item {} for {} dollars." print(myorder.format(quantity, itemno, price))
I want 3 pieces of item 567 for 49.95 dollars.