Re: Handling lists

2005-04-24 Thread [EMAIL PROTECTED]
That helps.Thanks much. -- http://mail.python.org/mailman/listinfo/python-list

Re: Handling lists

2005-04-23 Thread Michael Spencer
[EMAIL PROTECTED] wrote: ... 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 l

Re: Handling lists

2005-04-23 Thread James Stroud
On Saturday 23 April 2005 12:50 pm, [EMAIL PROTECTED] wrote: > 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 repr

Re: Handling lists

2005-04-23 Thread [EMAIL PROTECTED]
yes that makes sense.But the problem I am facing is if list= [300,301,303,305] I want to consider it as one cluster and include the range as [300,305] so this is where I am missing the ranges. so If the list has l = [300,301,302,308,401,402,403,408] i want to include it as [[300,308],[401,408]].

Re: Handling lists

2005-04-23 Thread Mage
[EMAIL PROTECTED] wrote: >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

Handling lists

2005-04-23 Thread [EMAIL PROTECTED]
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 alo