def isfloat(x): try: a = float(x) except (TypeError, ValueError): return False else: return Truedef isint(x): try: a = float(x) b = int(a) except (TypeError, ValueError): return False else: return a == b

def isfloat(x): try: a = float(x) except (TypeError, ValueError): return False else: return Truedef isint(x): try: a = float(x) b = int(a) except (TypeError, ValueError): return False else: return a == b