Handling lists
superprad at gmail.com
superprad at gmail.com
Sat Apr 23 15:50:50 EDT 2005
I have a question on python lists.
Suppose I have a 2D list
list = [[10,11,12,13,14,78,79,80,81,300,301,308]]
how do I convert it so that I arrange them into bins .
so If i hvae a set of consecutive numbers i would like to represent
them as a range in the list with max and min val of the range alone.
I shd get something like
list = [[10,14],[78,81],[300,308]]
More information about the Python-list
mailing list