New in #Python 3.12: itertools.batched, which finally implements my top-voted Stack Overflow answer (from 2008!) https://stackoverflow.com/a/312464/14343