Slicing iterables in sub-generators without loosing elements

Thomas Bach thbach at students.uni-mainz.de
Sat Sep 29 12:44:51 EDT 2012


On Sat, Sep 29, 2012 at 09:26:00AM -0700, Paul Rubin wrote:
> Thomas Bach <thbach at students.uni-mainz.de> writes:
> 
> itertools.groupby(data, lambda (x,y) : x)
> 
> is basically what you want.

True!

Thanks,
       Thomas Bach



More information about the Python-list mailing list