[Python] python提取字典的key列表 →→→→→进入此内容的聊天室

来自 , 2021-04-07, 写在 Python, 查看 141 次.
URL http://www.code666.cn/view/9969e581
  1. d2 = {'spam': 2, 'ham': 1, 'eggs': 3}    # make a dictionary
  2.  
  3. print d2                                       # order is scrambled
  4.  
  5. print d2.keys()                  # create a new list of my keys

回复 "python提取字典的key列表"

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

captcha