Question on lists

Aahz aahz at
Wed Jul 28 16:03:30 CEST 2004

In article <VaKNc.126557$od7.8959 at pd7tw3no>,
Elaine Jackson <elainejackson7355 at> wrote:
>If x is the given sequence, then
>[x[i] for i in filter(lambda i: i==0 or x[i-1]<>x[i], range(len(x)))]
>is what you want.

Please report to the UnPythonic Activities Committee.  ;-)
Aahz (aahz at           <*>

"To me vi is Zen.  To use vi is to practice zen.  Every command is a
koan.  Profound to the user, unintelligible to the uninitiated.  You
discover truth everytime you use it."  --reddy at

More information about the Python-list mailing list