pls check this: import numbers
import math
a = 1.1 - 0.1
print a
print isinstance(a, numbers.Integral)
print math.floor( a )
if (math.floor( a ) == a):
print "It is an integer number"
else:
print False
Although X is float but the value is integer, so if you want to check the value is integer you cannot use isinstance and you need to compare values not types.