mirror of
https://github.com/pmret/papermario.git
synced 2024-11-18 08:52:40 +01:00
6 lines
167 B
Python
6 lines
167 B
Python
from itertools import zip_longest
|
|
|
|
def iter_in_groups(iterable, n, fillvalue=None):
|
|
args = [iter(iterable)] * n
|
|
return zip_longest(*args, fillvalue=fillvalue)
|