python-取消科学技术法

Created at 2020-09-23 Updated at 2021-12-12 Category python Tag python

python 可以自动将数字表示为科学计数法,如果要转成数字,可以使用''.format()或者'%f' %

a = 7.1855143557448603e17
b = '{:f}'.format(a)
c = '{:.2f}'.format(a) # 保留小数点后两位
d = '%f' % a

Table of Content

Site by Cellophane using Hexo & Random

Hide