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

输出

I am 3.000000 years old

 

相关文章:

  • 2022-12-23
  • 2021-06-21
  • 2022-03-10
  • 2022-01-09
  • 2022-12-23
  • 2021-11-05
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-19
  • 2021-11-30
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案