New in #Python 3.12: itertools.batched, which finally implements my top-voted Stack Overflow answer (from 2008!) https://stackoverflow.com/a/312464/14343
@5e55ae2d Congrats. Probably time to update the answer?