Commit 51377138 by BellCodeEditor

save project

parent cab654c9
Showing with 4 additions and 1 deletions
...@@ -10,7 +10,10 @@ ...@@ -10,7 +10,10 @@
#print(list_hero) #print(list_hero)
# 请注释掉上面的代码,并在下一行创建一个名为dict_hero的字典 # 请注释掉上面的代码,并在下一行创建一个名为dict_hero的字典
dict_hero={'王林翰':10,'赵林翰':13} dict_hero={'王林翰':10,'赵林翰':13}
if '王林翰' in dict_hero:
print(dict_hero)
#dict_hero['刘林翰']=19
#print(dict_hero['王林翰']) #print(dict_hero['王林翰'])
dict_hero['王林翰']=20 #dict_hero['王林翰']=20
print(dict_hero) print(dict_hero)
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