My solution is pleasantly short. I tested whether a number (2) to the power of the input (x) is completely divisible by that number (2), as in it leaves no remainders and returns 0, as all integer powers will do this eg. ( 2 ** 3 = 2 x 2 x 2 ) and all decimals powers will not. I then used abs() so it works for negative inputs (eg -6) otherwise it would turn it to a fraction. Then I got the error that it doesn't work for zero, of course because 2** 0 = 1, so I just said if x is zero its also a integer. Hope that helps, I don't know of any fancy modules so I just thought to prove it mathematically instead, it also shows a use of using the abs() command. Here's my code:

def is_int(x):

if 2 ** abs(x) % 2 == 0 or x == 0:

return True

else: return False