使用 items()遍历键和值

  1. thisdict = {
  2. "brand": "Porsche",
  3. "model": "911",
  4. "year": 1963
  5. }
  6. for x, y in thisdict.items():
  7. print(x, y)