def grouper(iterable, n, fillvalue=None):
return list(zip_longest(*[iter(iterable)] * n, fillvalue=fillvalue))<EOL>
Group iterable by n elements.

    >>> for t in grouper('abcdefg', 3, fillvalue='x'):
    ...     print(''.join(t))
    abc
    def
    gxx