Commit 069041d8 by BellCodeEditor

save project

parent bd75d488
Showing with 3 additions and 1 deletions
dic_hero={"赵雄":20,"关羽":40,"刘备":60} dic_hero={"赵雄":20,"关羽":40,"刘备":60}
dic_hero["张飞"]=50 dic_hero["张飞"]=50
print(dic_hero) print(dic_hero)
#增加键值对
if"刘备"in dic_hero: if"刘备"in dic_hero:
print(dic_hero["刘备"]) print(dic_hero["刘备"])
#提取键值对
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment