Number abs() Method in Python 3:
Description -
The abs() method returns the absolute value of x, i.e. the
positive distance between x and zero.
Syntax -
Following is the syntax for abs() method
abs(x )
|
Parameters
x - This is a
numeric expression.
Return Value
This method returns the absolute value of x.
Example
The following example shows the usage of the abs() method.
When we run the above program, it produces the following result –