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