In <[EMAIL PROTECTED]>, Steve Howell
wrote:
>> def key_func(item):
>> return (len(item), item)
>>
>> data = ['viking', 'spam', 'parrot', 'ham', 'eric']
>> data.sort(key=key_func)
>> print data
>>
>
> Marc, when did the key feature get introduced, 2.4 or
> 2.5? I'm asking on behalf of the newbie, who's going
> to struggle with your solution if he's still running
> 2.3.
It's available in 2.4 but I don't know when it was introduced.
Ciao,
Marc 'BlackJack' Rintsch
--
http://mail.python.org/mailman/listinfo/python-list