def is_int(x): a = str(float(x)) p1 = int(a.split(".")) if p1 - x == 0: return True else: return False
Your code is prone to errors. If you are going to use the built in type check you might as well do this.
def is_int(data): try: return int(data) except TypeError: print("You failed to enter valid information")
You can of course change what some of this does but it should get my point across.
If you put in a string into your function it will flip it's wig.
I think it's the simplest solution.