?Does Python have sorting via "Dictionary Order"?

Norman Shelley Norman_Shelley-RRDN60 at email.sps.mot.com
Wed Jun 28 20:05:36 EDT 2000


Does Python have sorting via "Dictionary Order"?  This would be a very
handy addition as an option to list's sort() function.

This is defined by D. Richard Hipp as:
"The case of alphabetic characters is ignored, except to break ties.
Thus "B"
comes before "b" but after "a".  Also, integers embedded in the strings
compare
in numerical order.  In other words, "x10y" comes after "x9y", not
before it as
it would when using strcmp().




More information about the Python-list mailing list