Cody Bable

Generation

generate functionThu, 20 Apr 2023

check if string is a number

def is_number(string): try: float(string) return True except: return False is_number("123")

Questions about programming?Chat with your personal AI assistant