Yet another unique() function...

Paul Rubin http
Wed Feb 28 16:46:41 EST 2007


"MonkeeSage" <MonkeeSage at gmail.com> writes:
> In your case optimized version, in the second try clause using
> itertools, it should be like this, shouldn't it?
> 
> return t(g.next()[1] for k,g in groupby(s, lambda (i,v): v))

I didn't think so but I can't conveniently test it for now.  Maybe
tonight.  



More information about the Python-list mailing list