>>> list(itertools.dropwhile(lambda x: x<5,range(10)))
[5, 6, 7, 8, 9]

Why doesn't this work?
>>> list(itertools.dropwhile(lambda x: 2<x<5,range(10)))
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

Thanks,

Raj

-- 
"For him who has conquered the mind, the mind is the best of friends;
but for one who has failed to do so, his very mind will be the
greatest enemy."

Rajanikanth
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to