summaryrefslogtreecommitdiff
path: root/src/main/python/utils/funcs.py
blob: 7796eceaac3034688460f39d113f9cc256457856 (plain)
1
2
3
4
5
from itertools import zip_longest

def grouper(n, iterable, fillvalue=None):
    args = [iter(iterable)] * n
    return zip_longest(fillvalue=fillvalue, *args)