Commit 9c496dcc by BellCodeEditor

save project

parent a5d2a0b2
Showing with 6 additions and 5 deletions
# 直接运行以下代码,说说你的发现: # 直接运行以下代码,说说你的发现:
list_hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98]
dict_hero = {'赵一':30,'丁二':37,'孙五':52,'王猛':89,'周亮':98} dict_hero = {'可乐':3,'薯片':7,'蛋糕':5,'巧克力':9,'牛奶':8}
print(len(list_hero)) k=input("你要什么?")
print(len(dict_hero)) if k in dict:
\ No newline at end of file print("你的"+k+"需要支付"+str(dict[k])+"元"
\ 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