[18.104.22.168/dictionary] Change sorting order?
nospam at nospam.com
Fri Jan 22 13:17:44 CET 2010
I use a dictionary to keep a list of users connected to a web site.
To avoid users from creating login names that start with digits in
order to be listed at the top, I'd like to sort the list differently
every minute so that it'll start with the next letter, eg. display the
list from A...Zdigits the first time, then B...ZAdigits, etc.
That way, users have no incentive to create login names that start
with either a digit or letter A.
I see that dictionaries can be sorted using the... sort() method, but
is it possible to have Python start sorting from a different letter?
More information about the Python-list