3 ms·
Said before, but any(pred(x) for x in xs) is too complex?
by mattj 17y ago
Said before, but any(pred(x) for x in xs) is too complex?
- mccutchen 17y agoQuoting myself, now: "Using a generator expression works just as well, though, and is probably clearer in the long run." It's just that my first instinct is always to use all(xs, pred).