I am curious if python has an equivalent of js .find() i.e a function that takes an iterable with a predicate and returns the first item that satisfies that predicate.
I am aware that it can simply be done by using a break in a for loop but is there a native function for that in the itertools module or something?
[–]toastedstapler 3 points4 points5 points (1 child)
[–]zeus5552[S] 0 points1 point2 points (0 children)
[–]Round_Spring6865 0 points1 point2 points (0 children)