If you need to compare the equality of two floating point numbers, you can do so with some epsilon value, a small amount representing the precision you need. The numbers are effectively equal if they're within that tiny amount:
if abs(a - b) < 0.000001:
print("a equals b")
Another way of handling it is to round the two numbers to a reasonable number of digits, ie
1.0 instead of
See Wikipedia for more information on floating point arithmetic.