定义:用列表返回可遍历的(键,值)元组数组。 语法:dict.items() 返回值:(键,值)元组数组
dic_score
={"LiGang93":93, "ChenJing78":78, "ZhangJinzhu88":88, "ZhaoQishan91":91, "LiXin65":65, "HuangNing83":83}
print(dic_score
.items())
执行后 遍历字典列表
for key
,values in dic_score
.items():
print
(key
)
转载请注明原文地址:https://blackberry.8miu.com/read-2846.html