def get_type_details(v):
    for t in (int, float, str):
        try:
            value = t(v)
            return (t, value)
        except ValueError:
            continue
def get_type_details(v):
    for t in (int, float, str):
        try:
            value = t(v)
            return (t, value)
        except ValueError:
            continue