xavdid, Happy #python 3.12 day! There are a lot of improvements, but my favorite is the arrival of itertools.batched(iterable, n):
> Batch data from the iterable into tuples of length n. The last batch may be shorter than n.
Such a useful function!
docs: https://docs.python.org/3.12/library/itertools.html#itertools.batched