import math
print(math.log(math.e))

首先按照上述语句测试python中log函数的基地

一般来说输出结果是1

也就是说python中的log函数默认是ln函数

更多推荐

python中打出ln函数