If a Python string variable has had either an integer, floating point number or a non-numeric string placed in it, is there a way to easily test the \"type\" of that value?<
I'd do it like this:
def typeofvalue(text): try: int(text) return int except ValueError: pass try: float(text) return float except ValueError: pass return str