On Nov 26, 10:51 am, Paul Rubin <http://[EMAIL PROTECTED]> wrote: > Chris <[EMAIL PROTECTED]> writes: > > for i in range(int(round((len(lst)/n),0))): ... > > Ugh!!! Not even correct (under future division), besides being ugly. > I think you mean: > > for i in xrange(len(lst) // n): ... > > Really though, this grouping function gets reimplemented so often that > it should be built into the stdlib, maybe in itertools.
Beauty is in the eye of the beholder, but true... Looks crap :p -- http://mail.python.org/mailman/listinfo/python-list