def first_index_ne(data_list, value):
    '''returns first index not equal to the value from list'''
    try:
        index = next(data[0] for data in enumerate(data_list) if data[1] != value)
        return index
    except StopIteration: return - 1
returns first index not equal to the value from list
recipes/Python/578071_Fast_Indexing_functions_greater_thless_thequal/recipe-578071.py