Python dictionary: are keys() and values() always the same order?

Found this:

If items(), keys(), values(),
iteritems(), iterkeys(), and
itervalues() are called with no
intervening modifications to the
dictionary, the lists will directly
correspond.

On 2.x documentation and 3.x documentation.

Leave a Comment