Closed AustinScola closed 3 years ago
Add an index function for finding the first index of an element in an iterable that matches some predicate.
Note that there is a list.index but it only allows the the equality predicate.
list.index
def index(iterable: Iterable, predicate: Callable[...]) -> int: ...
Add an index function for finding the first index of an element in an iterable that matches some predicate.
Note that there is a
list.index
but it only allows the the equality predicate.