... this doc gives a nice breakdown of iterators, generators, built-ins, itertools and functools, all in one. ๐Ÿ’ช

And that's one thing I love about Python: great OOP support, but you can do so much functionally as well, often more concisely and elegantly. ๐Ÿš€

You get to choose!

So keep an eye out on the docs to expand and challenge your Pythonic thinking. ๐Ÿ“ˆ

Bonus tip below: how to un-lambda yourself.
I agree: just write a quick function, more readable + reusable (with the exception of using it inline in common built-ins like `sorted`)

0

If you have a fediverse account, you can quote this note from your own instance. Search https://fosstodon.org/users/bbelderbos/statuses/115536295095831673 on your instance and quote it. (Note that quoting is not supported in Mastodon.)