1、十进制整型---------%d
2、浮点型-------------%f
(1)保留两位小数------%.2f
(2)浮点数有五位,保留两位小数------%5.2f
3、字符串-------------%s
Print(‘my name is %s’%(‘xiaoming’))
运行为:my name is xiaoming
Print(‘my age is %d’%(18))
运行为:my age is 18
Print(‘name:%s age:%d height:%5.2f’%(‘xiaoming’,18,1.890))
运行为:name:xiaoming age:18 height: 1.89