📜  python代码示例中的遍历字典

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

代码示例3
a_dict = {'apple':'red', 'grass':'green', 'sky':'blue'}
for key in a_dict:
  print key # for the keys
  print a_dict[key] # for the values