demstavrou, TIL of Python's
math.isclose()
which allows you to determine if two values are close, given a tolerance.You can provide relative tolerance which takes into account the magnitude of the numbers. You can also provide an absolute tolerance.
Add comment