您好,登錄后才能下訂單哦!
#字典新增 修改元素
#健同名 會出現覆蓋
#更新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進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。