log 10 in python code example
Example 1: python log10
# Basic syntax:
# With math:
import math
math.log10(x) # Use math.log<base>(x) for other bases
# With Numpy:
import numpy as np
np.log10(x) # Use np.log<base>(x) for other bases
Example 2: log2 in python
math.log2(x) #x is a number
Example 3: python log10
import math
math.log10( x )