abs() returns the absolute value of the given argument. : abs « Buildin Function « Python Tutorial






# If the argument is a complex number, then math.sqrt(num .real2 + num.imag2) is returned.

print abs(-11)
print abs(110.)
print abs(11.12-21.11j)
print abs(10.213 - 10.178)








13.1.abs
13.1.1.abs() returns the absolute value of the given argument.
13.1.2.Call abs function to get absolute value