python字符串打印-不同方法vars

book = "library2"
pages = 350

print("the %(book)s book contains more than %(pages)s scripts"%vars())

the library2 book contains more than 350 scripts

posted @ 2020-01-10 14:53  了解2号  阅读(165)  评论(0编辑  收藏  举报