Commit bc10d559 by BellCodeEditor

save project

parent ff2b848c
Showing with 15 additions and 15 deletions
dict_hero={'猴三':10,'猴一':21} s1 = {'语':91,'数':65,'英':85,}
print(dict_hero) s2 = {'语':94,'数':67,'英':86,}
print(dict_hero['猴三']) s3 = {'语':92,'数':68,'英':87,}
dict_hero['猴一']=32 score = {'午':s1,'四':s2,'给':s3}
print(dict_hero) name = input("名字:")
dict_hero['猴十']=25 info = score[name]
print(dict_hero) for k,v in info.items():
print(k,v)
\ No newline at end of file
# 直接运行以下代码,说说你的发现: score = {'语文':120,'数学':100,'英语':100}
list_hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98] for k,v in score.items():
dict_hero = {'赵一':30,'丁二':37,'孙五':52,'王猛':89,'周亮':98} print(k,v)
print(len(list_hero))
print(len(dict_hero))
\ No newline at end of file \ 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