Home >>Python math Module >Python math.log10() Method

Python math.log10() Method

Python math.log10() Method

Python math.log10() method is used to returns the base-10 logarithm of the given input number.

Syntax:
math.log10(x)

Parameter Values

Parameter Description
x This is a required parameter. It defines the value to calculate the logarithm for.
Here is an example of Python math.log10() method:

import math
print(math.log10(10))
print(math.log10(2))
print(math.log10(1))

Output:
1.0
0.3010299956639812
0.0