问什么dict的读取结果有()?
d = {
'Alice': 45,
'Bob': 60,
'Candy': 75,
'David': 86,
'Ellena': 49
}
for key in d:
value = d[key]
if value > 80:
print(key, value)
运行成功
('David', 86)
d = {
'Alice': 45,
'Bob': 60,
'Candy': 75,
'David': 86,
'Ellena': 49
}
for key in d:
value = d[key]
if value > 80:
print(key, value)
('David', 86)
2021-03-27
举报