Get the App
SLTechnology News&Howtos  ›  Development  › 

How python uses zip inverse Dictionary object

Shulou Source: shulou.com Published: 2022-06-01 04:49:40 11月10日 Update

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!

Tags: Dictionaries objects content articles values interests guys buddies more knowledge industry information information channels channels references help Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Xiaomi macOS Apple Redmi