How python uses zip inverse Dictionary object
This article mainly introduces python how to use zip inverse dictionary object, the article is very detailed, has a certain reference value, interested friends must read it!
Using zip inverse Dictionary objects
> m = {"a": 1, "b": 2, "c": 3, "d": 4} > m.items () [("a", 1), ("c", 3), ("b", 2), ("d", 4)] > zip (m.values (), m.keys ()) [(1, "a"), (3, "c"), (2, "b"), (4) "d")] > mi = dict (zip (m.values (), m.keys () > mi {1: "a", 2: "b", 3: "c", 4: "d"} are all the contents of the article "how python uses zip inverse Dictionary objects" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!