#with integers print(abs(-10)) #with floating point values print(abs(2.5)) #with complex numbers print(abs(4 + 3j))>>> abs(-2) >>> 2val = -85 abs_val = abs(val) {1e999: x, -1e999: -x}[x*1e999]
#with integers print(abs(-10)) #with floating point values print(abs(2.5)) #with complex numbers print(abs(4 + 3j))>>> abs(-2) >>> 2val = -85 abs_val = abs(val) {1e999: x, -1e999: -x}[x*1e999]