say3='there are %d monkey in the %s !
print(say3 % (5,'tree'))
-----------------------------------
d1=(3,'tree')
d2=(5,'water')
print(say3 % d1)
print(say3 % d2)
Python学习----格式化字符串
猜你喜欢
转载自blog.csdn.net/printfsome/article/details/81077465
今日推荐
周排行