S
superprad
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]]
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]]