def first_index_gt(data_list, value):
    '''return the first index greater than value from a given list like object'''
    try:
        index = next(data[0] for data in enumerate(data_list) if data[1] > value)
        return index
    except StopIteration: return - 1
return the first index greater than value from a given list like object
recipes/Python/578071_Fast_Indexing_functions_greater_thless_thequal/recipe-578071.py