This has gotten a bit OT, but I’ll roll with it.....
But what about `pip install more-itertools`? Hopefully you become >> comfortable with that a lot faster than 3 years in. > > more-itertools Is kind of a special case (or at least different case), as it’s a collection of handy general purpose utilities, rather than a package designed to address particular problems, like , say requests or pytest (probably the first two packages I suggest newbies install) In fact, itertools itself is a bit odd that way — it’s not clear what types of problems it might address: You want to look In itertools If you need to iterate through something in a non-trivial, but probably common enough that others need to do it too way. Honestly, I often forget to look there when I should. Which brings us back to the OP's question: What is a good way to loop through and iterable and apply an operation to it when you don't want to create a new iterable? I doubt anyone is going to find consume() in itertools (even if it was built in) and know it use it to solve this use case. -CHB > >
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/RHWZ6RYOUBGGOADY5GD7AR5ERKE4FOLH/ Code of Conduct: http://python.org/psf/codeofconduct/