Hacker News new | ask | show | jobs
by ospohngellert 2808 days ago
The first one is clearly easier to read than the second. However the first one is slow. I believe fast_any is easier to read than generator code.
2 comments

Actually, apologies I see now. I always associated generator's with the `yields` keyword, but maybe I have to look into them again. Thanks!
The first IS generator code. That's a generator expression, note that it does not have the [] of a list expression.