Python cmath.e() 方法

定义和用法

cmath.e 常量返回欧拉数:2.718281828459045。

实例

打印欧拉数 e 的值:

# 导入 cmath 库  
import cmath   
  
# 打印欧拉数 e 的值  
print (cmath.e)

亲自试一试

语法

cmath.e

技术细节

返回值: 浮点数值,2.718281828459045,代表数学常量 e。
Python 版本: 1.5