#运算符%方法 print("My name is %s"%"ABC") #*.format()方法,需要在""中加{},因为方法本质是key映射 print("My {} is {}".format("age","32")) print("My {a1} is {a2}".format(a1="age",a2="32"))
三.使用字符串
原文:https://www.cnblogs.com/i201102053/p/10617753.html