📜  python 遍历字典 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:09.052000             🧑  作者: Mango

代码示例6
a_dict = {"color": "blue", "fruit": "apple", "pet": "dog"}

# Will loop through the dict's elements (key, value) WITHOUT ORDER
for key, value in a_dict.items():
  print(key, '->', value)