On Fri, Sep 19, 2014 at 10:26 PM, alister <alister.nospam.w...@ntlworld.com> wrote: > As far as I understand it the order of keys in a dict is not guaranteed > iterating over the same dict twice (without changes) does not have to > return the keys in the same order.
The exact guarantee is that you can iterate over keys() followed by values() and they will correspond. This implies (in the strict logical sense of the word "implies", as well as the common sense of the same word) that iterating multiple times over keys() will correspond, which is the point I drew above. ChrisA -- https://mail.python.org/mailman/listinfo/python-list