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