Home >>Python Built-in Functions >Python abs() Function
Python abs() function is used to return the absolute value of any given input number. It takes only one argument that is the number whose absolute value is to be returned. This argument can be an integer, a floating point number or a complex number.
Syntax:abs(n)
Parameter | Description |
---|---|
n | This is a required patameter. It defines a input number. |
x = abs(-66.74) print(x)
x = abs(8+2j) print(x)