How to calculate natural log in Python?
Call math.log(x)
on a number x
to return the natural logarithm of x
.
Advertisements
#Calculate natural log of `5` natural_log = math.log(5) print(natural_log) #1.6094379124341003