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