def find_with_type(value, list_):
    """
    Find value in list_, matching both for equality and type, and
    return the index it was found at. If not found, raise ValueError.
    """
    for index, comparison_value in enumerate(list_):
        if (type(value) == type(comparison_value) and
            value == comparison_value):
            return index
    raise ValueError