Python如何获取0.000001而不是1e-06 [重复] 由 太假发布于 2020-05-24 02:55:56 pythonmathdivisionnumbersmathematical-optimization 收藏 我要打印整个数字而不是1e-06 number = 1 result = number/1000000 print(result) 请帮助做什么的最好方法是什么? 评论 请 登录后发表观点 She 2020-05-24 02:55:56 output = f"{num:.9f}" you can replace 9 with the amount of numbers you have on your number. 点赞 评论 She 2020-05-24 02:55:56 Try out the following by using format: number = 1 result = number/1000000 print('{0:.6f}'.format(result)) 输出: 0.000001 点赞 评论 到底啦
output = f"{num:.9f}"
you can replace
9
with the amount of numbers you have on your number.Try out the following by using
format
:输出: