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
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)