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

def grouper ( n , iterable , fillvalue = None ) : args = ( [ iter ( iterable ) ] * n ) return izip_longest ( fillvalue = fillvalue , * args )
grouper --> abc def gxx .