Re: [Tutor] samples on sort method of sequence object.

2010-01-12 Thread Kent Johnson
On Tue, Jan 12, 2010 at 9:39 AM, Make Twilight wrote: >  I can understand how to use parameters of cmp and reverse,except the > key parameter... >  Would anyone give me an example of using sort method with key parameter? http://personalpages.tds.net/~kent37/kk/7.html Kent ___

Re: [Tutor] samples on sort method of sequence object.

2010-01-12 Thread Hugo Arts
On Tue, Jan 12, 2010 at 3:39 PM, Make Twilight wrote: > Hi,there: >  The document of > Python.org[http://docs.python.org/library/stdtypes.html] says that: > > > >  I can understand how to use parameters of cmp and reverse,except the > key parameter... >  Would anyone give me an example of using s

[Tutor] samples on sort method of sequence object.

2010-01-12 Thread Make Twilight
Hi,there: The document of Python.org[http://docs.python.org/library/stdtypes.html] says that: -- s.sort([cmp[, key[, reverse]]]) 8. The sort() method takes optional arguments fo