[python] Find first element in a sequence that matches a predicate