1 2 3 4 5 6 7 8
def is_numeric(n): if n == None: return False try: int(n) return True except ValueError: return False