Python log() function
Description
log() returns the natural logarithm of x.
Syntax
The syntax of the log() method is as follows:
import math
math.log(x[, base])
**Note:** log() cannot be accessed directly; you need to import the math module and call the method through the static object.
Parameters
- x -- a numeric expression.
- base -- optional, the base, defaulting to e.
Python Numbers