mirror of
https://github.com/pmret/papermario.git
synced 2024-11-12 14:03:56 +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)
|