[2.5.1.1/dictionary] Change sorting order?

Gilles Ganault nospam at nospam.com
Fri Jan 22 08:58:58 EST 2010


On 22 Jan 2010 13:35:26 GMT, Neil Cerutti <neilc at norwich.edu> wrote:
>Resorting is more work than is needed. Just choose a different
>starting index each time you display the names, and set up your
>lister to wrap-around to your arbitrary starting index.

Thanks. In this case, it means that in each loop iteration, I must
search the list to find which item starts with the letter I'd like to
begin sorting, eg. "B". Does Python include a search method or do I
have to use a for loop to locate this starting item?



More information about the Python-list mailing list