Commit 1e487b04 by BellCodeEditor

save project

parent 067b1ced
Showing with 6 additions and 3 deletions
...@@ -2,5 +2,9 @@ ...@@ -2,5 +2,9 @@
# #
# 请注释掉上面的代码,并在下一行创建一个名为dict_hero的字典 # 请注释掉上面的代码,并在下一行创建一个名为dict_hero的字典
dict_hero={'a':5,'b':8,'c':9} dict_hero={'a':5,'b':8,'c':9}
dict_hero['c']=30 dict_hero['c']=35
print(dict_hero) dict_hero['r']=4
\ No newline at end of file if 'c' in dict_hero:
print(dict_hero['c'])
else:
print('没有数据')
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