Python All Function With Absolute Values Equation