![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Mar 2008
Posts: 1
Rep Power: 0
![]() |
A sort question
Hi all,
I have a sort questions. I can't really find an easy way to do this, so any advice is appreciated. Basically, I have a few dictionaries as such: {a:[7,8,9]} {b:[4,5,6,]} {c:[1,2,3]} Is there any easy way to sort by the second item in the list such that I get: {c:[1,2,3]} {b:[4,5,6,]} {a:[7,8,9]} I can do something similar in the shell with sort -k, but I'm not sure if there is a simple way to do this in python. Any help is appreciated! ![]() |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Question regarding data input into PHP/Mysql using something other than GET | davil | PHP | 6 | Nov 20th, 2007 8:06 AM |
| Quick Sort program | jazz | C | 11 | Jun 1st, 2006 4:08 AM |
| sort of a noob question... | Varrickmana | C++ | 5 | May 26th, 2006 10:00 AM |
| sort and swap | brad sue | C | 1 | Mar 25th, 2006 6:33 AM |
| threaded merge sort help | AusTex | C | 1 | May 1st, 2005 4:58 PM |