split a list based on a predicate

Rajanikanth Jammalamadaka rajanikanth at gmail.com
Thu Oct 9 01:36:03 CEST 2008


Hi!

Is there a functional way to do this?

I have an array [0,1,2,3,0,1,2,2,3] and I want the first chunk of
non-decreasing values from this array (eg: In this case I want
[0,1,2,3])

Thanks,

Rajanikanth



More information about the Python-list mailing list