Hello,
A function that returns True for an integer number (int or integer float) can be defined as follows.
def is_integer_num(n):
if isinstance(n, int):
return True
else:
return False
print(is_integer_num(100)) //you can use for loop here and check the number
# True
print(is_integer_num(1.23))
# False
The built-in function isinstance(object, type) can be used to determine whether an object is of a particular type.\
Hope it helps!!
Thank you!!