def valid_type(data):
    """
    >>> valid_type(0.1)
    True
    >>> valid_type(1)
    True
    >>> valid_type("hola")
    False
    >>> valid_type([1, 2])
    False
    """

    return type(data) in [int, float]