Help with multiple key sort
Paul Rubin
http
Tue Feb 6 13:42:53 EST 2007
More information about the Python-list mailing list
Tue Feb 6 13:42:53 EST 2007
- Previous message (by thread): electronics and python
- Next message (by thread): Help with multiple key sort
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ian.brady1 at gmail.com writes: > It moves right while keeping sorted order to the left. This is the > new stable sort in 2.5. >>> b ['1 one 2', '1 one 1', '1 two 1', '1 one 0', '1 xx 0'] >>> sorted(b,key=lambda x: x.split()) ['1 one 0', '1 one 1', '1 one 2', '1 two 1', '1 xx 0']
- Previous message (by thread): electronics and python
- Next message (by thread): Help with multiple key sort
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list