摘要: dic = {'k1': 'v1', 'k2': 'v2', 'k3': 'v3'} # 1.遍历出所有的key for key in dic: print(key) # 2.遍历出所有的value for key in dic: print(dic[key]) # 3.遍历出所有的key和value for key in dic: print(key, di... 阅读全文
posted @ 2018-11-08 15:34 梁少华 阅读(395) 评论(0) 推荐(0) 编辑