#字典新增 修改元素
#健同名 会出现覆盖
#更新update
dict_query={"name":"lucky","height":180}
"""
演练1.查询字典找那个每个元素的键与值
"""
# print(key,dict_query[key])
print(dict_query.keys())
print(dict_query.values())
print(dict_query.items())
print(list(dict_query.keys()))
key_list=["name","age","id"]
value_list=['Arven','10','1']
print(dict(zip(key_list,value_list)))
stuent_info = {
"name":'张三',
"gender":"man",
"age":"18",
"score":{
"chinese":[66,77,88],
"Math":[78,88,98],
"English":[80,90,100]
},
"ranking":{
"first":15,
"second":10,
"thirdly":5
},
}
print(stuent_info["score"]['English'][1])
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。