【发布时间】:2021-07-01 15:28:29
【问题描述】:
我想在科学记数法中添加特定数量的尾随零。 例子- 对于输入数字:
2e-09
9.123456e-06
2.123456789e-03
我希望输出如下:
2.000000000e-09
9.123456000e-06
2.123456789e-03
知道如何达到要求的结果吗?
【问题讨论】:
-
你可以试试
"{:.15e}".format(x)
标签: python python-3.x string numbers scientific-notation