totally lost newbie
Marc 'BlackJack' Rintsch
bj_666 at gmx.net
Sun May 27 10:42:28 EDT 2007
In <mailman.8245.1180274585.32031.python-list at python.org>, 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
More information about the Python-list
mailing list