Cody Bable

Generation

generate functionThu, 20 Apr 2023

check if string is a number

def isNumber(string): try: float(string) return True except ValueError: return False isNumber("1") #True

Questions about programming?Chat with your personal AI assistant