Keys and values are listed in an arbitrary order which is non-random, varies across Python implementations, and depends on the dictionary's history of insertions and deletions. If items()
, keys()
, values()
, iteritems()
, iterkeys()
, and itervalues()
are called with no intervening modifications to the dictionary, the lists will directly correspond.
From the documentation for dict.