>>> delta = 0.0001 >>> var = 3.0 - 2.7 >>> 0.3 - delta < var < 0.3 + delta True >>> abs(var - 0.3) < delta True