Commit 7ba119ee by BellCodeEditor

auto save

parent a56e9de3
Showing with 6 additions and 4 deletions
# 直接运行以下代码,说说你的发现: # 直接运行以下代码,说说你的发现:
list_hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98] list_hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98]
dict_hero = {'可乐':30,'雪碧':37,'芬达':52,'农夫三拳':89,'圣水':98} dict = {'可乐':30,'雪碧':37,'芬达':52,'农夫三拳':89,'圣水':98}
k = input('你想买破壁东西') k = input('你想买破壁东西')
if k in dict_hero: if k in dict:
print(dict_herostr[k]) print('你想要的货物'+ k + '需要'+str(dict[k])+'元')
\ No newline at end of file else:
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