def grouper(n, iterable, padvalue=None):
    return zip_longest(*[iter(iterable)]*n, fillvalue=padvalue)
grouper(3, 'abcdefg', 'x') --> ('a','b','c'), ('d','e','f'),
dataset/ETHPy150Open lsbardel/python-stdnet/stdnet/utils/__init__.py/grouper