[Python] python字典遍历演示代码 →→→→→进入此内容的聊天室

来自 , 2020-11-24, 写在 Python, 查看 129 次.
URL http://www.code666.cn/view/fa751856
  1. #the key and corresponding value can be retrieved at the same time using the
  2. #iteritems() method.
  3.  
  4. knights = {'Key 1': 'value 1', 'key 2': 'value 2'}
  5. for k, v in knights.iteritems():
  6.      print k, v
  7.  

回复 "python字典遍历演示代码"

这儿你可以回复上面这条便签

captcha