> > That's not for everyone, so it isn't a loss if > > someone sticks > > with writing plain, clear everyday Python instead of > > an itertool. > > I know most of the module is fairly advanced, and that > average users can mostly avoid it, but this is a very > common-antipattern that groupby() solves:
I think the OP would have been better-off with plain vanilla Python such as: See http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/259173 Raymond -- http://mail.python.org/mailman/listinfo/python-list