Chris <cwitts at gmail.com> 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.