(iterable, pred)
return None
Return the (first) index of el in `iterable` where `pred(el)` returns True.

    If no element matches return `None`.
Return the (first) index of el in `iterable` where `pred(el)` returns True.
Return the ( first ) index of el in iterable where pred ( el ) returns True .
def index_where(iterable, pred):
    # type: (Iterable[T], Callable[[T], bool]) -> Optional[int]
    """
    Return the (first) index of el in `iterable` where `pred(el)` returns True.

    If no element matches return `None`.
    """
    for i, el in enumerate(iterable):
        if pred(el):
            return i
    return None
def index_where ( iterable , pred ) : # type: (Iterable[T], Callable[[T], bool]) -> Optional[int] for i , el in enumerate ( iterable ) : if pred ( el ) : return i return None