def groupmore(func=None, *its):
 if (not func):
  func = (lambda x: x)
 its = sortmore(key=func, *its)
 nfunc = (lambda x: func(x[0]))
 zipper = itertools.groupby(zip(*its), nfunc)
 unzipper = ((key, zip(*groups)) for (key, groups) in zipper)
 return unzipper

def groupmore ( func = None , * its ) : if ( not func ) : func = ( lambda x : x ) its = sortmore ( key = func , * its ) nfunc = ( lambda x : func ( x [ 0 ] ) ) zipper = itertools . groupby ( zip ( * its ) , nfunc ) unzipper = ( ( key , zip ( * groups ) ) for ( key , groups ) in zipper ) return unzipper
extends the itertools .