python print the string - Different methods 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

Guess you like

Origin www.cnblogs.com/chillytao-suiyuan/p/12176142.html