Python中 e | E 用法详解

e | E 科学计数法(scientific notation)

含义

Returns a float multiplied by the specified power of 10.
返回一个乘以 10 的指定次方的浮点值

语法

[0-9]e[0-9]
[0-9]E[0-9]

示例

>>> 1.1
1.1
>>> 1.1e0
1.1          # 1.1 * 10**0
>>> 1.1e1
11.0         # 1.1 * 10**1
>>> 1.1e2
110.0        # 1.1 * 10**2
>>> 1.1e3
1100.0       # 1.1 * 10**3
>>> 8e-2
0.08         # 8 * 10**-2
>>> -1e-2
-0.01         # -1 * 10**-2

猜你喜欢

转载自blog.csdn.net/qq_37454669/article/details/121069131
E
e'e