To find the absolute value of a number :
x
abs(x)
If is
negative, the function returns x-; otherwise it returns x.
x
For complex values, the function returns the magnitude,
that is, the square root of (.
x.real**2+x.imag**2)
>>> abs(-33) 33 >>> abs(33) 33 >>> abs(0) 0 >>> abs(complex(1,5)) 5.0990195135927845