dropwhile question
Rajanikanth Jammalamadaka
rajanikanth at gmail.com
Sat Aug 23 17:54:09 EDT 2008
>>> 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
More information about the Python-list
mailing list