Skip to content

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

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.