if type(1) == int or float: code example
Example 1: isinstance float or int
#checks if var is float or integer
isinstance(var, (float, int))
Example 2: check if float is integer python
>>> def isFloatInteger(float):
>>> return float.is_integer()
>>> isFloatInteger(0.62)
False
>>> isFloatInteger(1.00)
True