Find last matching index
Finds the index of the last element in the given list that satisfies the provided testing function.
- Use a list comprehension,
enumerate()andnext()to return the index of the last element inlstfor whichfnreturnsTrue.
Finds the index of the last element in the given list that satisfies the provided testing function.
enumerate() and next() to return the index of the last element in lst for which fn returns True.