num=3
str='I am %f years old' % (num)
print(str)

输出

I am 3.000000 years old
05-12 08:36