Commit 9accd71e by BellCodeEditor

save project

parent 73cfff2b
Showing with 7 additions and 7 deletions
...@@ -2,4 +2,4 @@ ...@@ -2,4 +2,4 @@
list_hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98] list_hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98]
dict_hero = {'赵一':30,'丁二':37,'孙五':52,'王猛':89,'周亮':98} dict_hero = {'赵一':30,'丁二':37,'孙五':52,'王猛':89,'周亮':98}
print(len(list_hero)) print(len(list_hero))
print(len(dict_hero)) print(len(dict_hero))
\ No newline at end of file
name={"海军":138,"林肯":123,"雷成海":134} dict={"可口可乐":3,"汉堡":6,"缺牙齿":1}
name["石头"]=100 k=input("你想要什么")
if "呼呼" in name: if k in dict:
print("在") print("你要的"+k+"是"+str(dict[k])+"元")
else: else:
print("不在") print("抱歉缺货")
\ 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