通过位置参数传参 print('{}, {}'.format('KeithTt', 18)) # KeithTt, 18 位置参数可以通过索引调用 print('{1}, {0}'.format('KeithTt', 18)) # 18, KeithTt 通过关键字参数传参 print('{name}, {age}'.format(name='KeithTt', age=18)) # KeithTt, 18 print('{age}, {name}'.format(name='KeithTt',…