Course
Simulator
More
Premium
Log in
Python Function Reference
Functions
math.log
math.log
Return the natural logarithm of x, or the logarithm of x to the given base.
Python 3.13
math
.
log
(
x
,
base
=
e
)
x
The number to find the logarithm of.
base
The base of the logarithm (defaults to e).
Examples
Python 3.13
>>
>
import
math
>>
>
math
.
log
(
10
)
2.302585092994046