copysign(x,y)
print(math.copysign(3,-2)) # -3.0 print(math.copysign(-3,-2)) # -3.0 print(math.copysign(-3,2)) # 3.0 print(math.copysign(3,2)) # 3.0
Post your comments , suggestion , error , requirements etc here