| View previous topic :: View next topic |
| Author |
Message |
Poolkop
Joined: 01 Jun 2006 Posts: 123
|
| I have a list of tuples where the first tuple item is always an integer and I would like to sort the tuples within the list according to the value of that integer, any pointers please? |
| |
|
|
|
|
WarChild
Joined: 24 Feb 2006 Posts: 46
|
The python tutorial.
sort() and reverse() methods of list objects. |
| |
|
|
froomzer
Joined: 23 May 2006 Posts: 148
|
| Poolkop, help(sorted), key specifically... |
| |
|
|
Poolkop
Joined: 01 Jun 2006 Posts: 123
|
| Thanks froomzer |
| |
|
|
froomzer
Joined: 23 May 2006 Posts: 148
|
| Yep. |
| |
|
|
|
|