Steven D'Aprano wrote:
> On Mon, 08 Jan 2007 13:55:40 +0100, Peter Otten wrote:
>
>>> The precise results depend on the version of Python you're running, the
>>> amount of memory you have, other processes running, and the details of
>>> what's in the list you are trying to sort. But as my test sh
On Mon, 08 Jan 2007 13:55:40 +0100, Peter Otten wrote:
>> The precise results depend on the version of Python you're running, the
>> amount of memory you have, other processes running, and the details of
>> what's in the list you are trying to sort. But as my test shows, sort has
>> some overhead
Steven D'Aprano wrote:
> On Sun, 07 Jan 2007 20:55:19 -0500, Dan Sommers wrote:
>
>> On Sun, 07 Jan 2007 22:23:22 +0100,
>> "Michael M." <[EMAIL PROTECTED]> wrote:
>>
>>> How to find the longst element list of lists?
>>> I think, t
On Sun, 07 Jan 2007 20:55:19 -0500, Dan Sommers wrote:
> On Sun, 07 Jan 2007 22:23:22 +0100,
> "Michael M." <[EMAIL PROTECTED]> wrote:
>
>> How to find the longst element list of lists?
>> I think, there should be an easier way then this:
>
>> s1
Scott David Daniels wrote:
> Dan Sommers wrote:
>> ...
>> longest_list, longest_length = list_of_lists[ 0 ], len( longest_list
>> ) for a_list in list_of_lists[ 1 : ]:
>> a_length = len( a_list )
>> if a_length > longest_length:
>> longest_list, longest_length =
Scott David Daniels wrote:
> Dan Sommers wrote:
>> ...
>> longest_list, longest_length = list_of_lists[ 0 ], len(
>> longest_list )
>> for a_list in list_of_lists[ 1 : ]:
>> a_length = len( a_list )
>> if a_length > longest_length:
>> longest_list, longest_lengt
Dan Sommers wrote:
> ...
> longest_list, longest_length = list_of_lists[ 0 ], len( longest_list )
> for a_list in list_of_lists[ 1 : ]:
> a_length = len( a_list )
> if a_length > longest_length:
> longest_list, longest_length = a_list, a_length
> will run faster
On Sun, 07 Jan 2007 22:23:22 +0100,
"Michael M." <[EMAIL PROTECTED]> wrote:
> How to find the longst element list of lists?
> I think, there should be an easier way then this:
> s1 = ["q", "e", "d"]
> s2 = ["a", "b"
Sorry, wrong place.
--
http://mail.python.org/mailman/listinfo/python-list
Bruno Desthuilliers wrote:
>
> Err... this makes three distinct lists, not a list of lists.
>
Sure. Logically spoken. Not in Python code. Or a number of lists.
Sure not [[ bla... ] [bla.]] etc.
--
http://mail.python.org/mailman/listinfo/python-list
Michael M. schrieb:
>> Err... this makes three distinct lists, not a list of lists.
>>
>
> Sure. Logically spoken. Not in Python code. Or a number of lists.
> Sure not [[ bla... ] [bla.]] etc.
???
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
>
> Err... this makes three distinct lists, not a list of lists.
>
Sure. Logically spoken. Not in Python code. Or a number of lists.
Sure not [[ bla... ] [bla.]] etc.
--
http://mail.python.org/mailman/listinfo/python-list
Michael M. a écrit :
> How to find the longst element list of lists?
For what definition of "find" ? You want the lenght of the longest
sublist, it's index, or a reference to it ?
> I think, there should be an easier way then this:
>
> s1 = ["q", "
Michael M. kirjoitti:
> How to find the longst element list of lists?
>
> I think, there should be an easier way then this:
>
> s1 = ["q", "e", "d"]
> s2 = ["a", "b"]
> s3 = ["a", "b", "c&qu
How to find the longst element list of lists?
I think, there should be an easier way then this:
s1 = ["q", "e", "d"]
s2 = ["a", "b"]
s3 = ["a", "b", "c", "d"]
if len(s1) >= len(s2) and
Michael M. schrieb:
> How to find the longst element list of lists?
>
> I think, there should be an easier way then this:
>
>s1 = ["q", "e", "d"]
>s2 = ["a", "b"]
>s3 = ["a", "b", "
On 1/7/07, Michael M. <[EMAIL PROTECTED]> wrote:
> How to find the longst element list of lists?
s1 = ["q", "e", "d"]
s2 = ["a", "b"]
s3 = ["a", "b", "c", "d"]
s = [s1, s2, s3]
s.sort(key=len, re
17 matches
Mail list logo