Commit bc10d559 by BellCodeEditor

save project

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