Python,print输出占位符的使用

s = "I am %s,age %d" % ('alex', 18,)
print(s)

  更多教程,来极客易先生的开发渗透课。上 www.hk007.cn

s = "i am %(n1)s,age %(n2)d " % {"n1":'alex', "n2": 18}
print(s)
原文地址:https://www.cnblogs.com/yigongzi/p/6863331.html