Doubt regarding sorting of a list specific field

Steven Bethard steven.bethard at gmail.com
Wed Apr 13 03:30:40 EDT 2005


Steven Bethard wrote:
> See my other post in this thread.  seq.sort() is not stable;

Hmmm...  That didn't come out right.  list.sort *is* stable.  It's just 
that if you want to sort only by the first element of each tuple in a 
list, then list.sort won't produce results that are stable under this 
criterion.

STeVe



More information about the Python-list mailing list