def to_int_float_or_string(s):
    """ Convert string to int or float if possible

    If s is an integer, return int(s)
    >>> to_int_float_or_string("3")
    3
    >>> to_int_float_or_string("-7")
    -7

    If s is a float, return float(2)
    >>> to_int_float_or_string("3.52")
    3.52
    >>> to_int_float_or_string("-10.0")
    -10.0
    >>> to_int_float_or_string("1.4e7")
    14000000.0

    Otherwise, just return the string s
    >>> to_int_float_or_string("A3")
    'A3'

    """

    try:
        s_int = int(s)

        # int(s) will truncate.  If user specified a '.', return a float instead
        if "." not in s:
            return s_int
    except (TypeError, ValueError):
        pass

    try:
        return float(s)
    except (TypeError, ValueError):
        return s