- 博客(1)
- 收藏
- 关注
原创 python作业
print(items, type(items)) # dict_items([('张三', 100), ('李四', 98), ('王五', 45)]) <class 'dict_items'>print(list(items)) # [('张三', 100), ('李四', 98), ('王五', 45)] 将dict_items转化为list类型 里面是由元组组成的。print(scores.get('麻七', 99)) # 99 是在查找'麻七'所对的value不存在时,提供的一个默认值。
2023-11-09 13:14:17
171
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅