1. % %是最常用的格式化输出形式,后面接类型,%s,%d,%c等等 name = input() print('I am %s' % name) 2.format format也是常用格式化输出 print('i am {}, {}years old,{}kg'.format('pis',20,55)) print('i am {name}, {age}years old,{weight}kg'.format(name='pis',age=20,weight=55)) {xx}里面可以填ke…