📜  如何使用 %s python 代码示例在字符串中创建多个占位符

📅  最后修改于: 2022-03-11 14:45:33.374000             🧑  作者: Mango

代码示例1
a = 'bananas'
b = 'apples'
c = 'peaches'
print('I like to eat %s, %s and %s' %(a, b, c))
#Prints: I like to eat bananas, apples and peaches