>>> a=10.5
>>> a
10.5
>>> a==float
False
def RepresentsInt(s):
try:
int(s)
return True
except ValueError:
return False
>>> print RepresentsInt("+123")
True
>>> print RepresentsInt("10.0")
False
>>> print(3/1)
3.0
if 3.0%1 == 0:
print("It's int")
else:
print("It's float")