The cmath.log10() function calculates the base-10 logarithm of a given complex number.

Syntax:
cmath.log10(x)
x The value(real or complex) whose base-10 logarithm is to be calculated.
Parameters:

The function returns the base-10 logarithm of x as a complex number.  The value returned is equivalent to cmath.log(x, 10).

ExampleEdit & Run
import cmath

print(cmath.log10(100))
print(cmath.log10(1000+10j))
print(cmath.log10(50+10j))
Output:
(2+0j)(3.000021713638431+0.004342800062890486j)(1.7074866739854089+0.08572780239500628j)[Finished in 0.010730077978223562s]

If the value of is 0, a ValueError is raised.

ExampleEdit & Run
import cmath

cmath.log10(0)
Output:
Traceback (most recent call last):  File "<string>", line 3, in <module>ValueError: math domain error[Finished in 0.010106478119269013s]