Inverse of dict(zip(x,y))
hniksic at xemacs.org
Wed Mar 4 12:11:47 CET 2009
psykeedelik <icymist at gmail.com> writes:
> """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....."""
> I hope it does not mean that the key->value mapping is not
> guaranteed, but only that the order of the [key: value] pairs would
> change. Which one is right?
The latter, of course. The documentation is trying to warn you not to
rely on the order of returned pairs, not imply that the items() method
More information about the Python-list