msg = 'i am %s my hobby is %d' % ( 'ihf',8) , = 'i am ihf my hobby is 8'
%s传什么格式都可以,
%d只可以传数字,
%.2f打印浮点数(保留小数点后两位)
print('sds','err',sep = ':') , = sds:err #sep字符串拼接
msg = 'i am %s my hobby is %d' % ( 'ihf',8) , = 'i am ihf my hobby is 8'
%s传什么格式都可以,
%d只可以传数字,
%.2f打印浮点数(保留小数点后两位)
print('sds','err',sep = ':') , = sds:err #sep字符串拼接