What is the best possible way to check if a string can be represented as a number in Python?
The function I currently have right now is:
def is_numb
Try this.
def is_number(var): try: if var == int(var): return True except Exception: return False