Commit 7cdd2c6e by BellCodeEditor

auto save

parent 45f5a7c0
Showing with 40 additions and 14 deletions
# 和你的小伙伴用列表讲讲桃园结义的故事,并说说这其中运用了哪些列表知识: # a={
# 来,我给你起个头~ # '张三':{'科学':100,'英语':90,'数学':98},
# 从前啊,有三个bro,分别是:刘备、关羽、张飞... # '李四':{'科学':10,'英语':290,'数学':198},
bro1="关羽" # '王五':{'科学':20,'英语':190,'数学':398}
bro2="刘备" # }
bro3="张飞" # for i in a.items():
bros=["刘备","关羽","张飞"] # print(i)
bro1=["关羽",160,8.5] # #剥洋葱 一层一层往里递进
bro2=["刘备",161,9.1] # # print(a['张三'])
bro3=["张飞",166,8.3] # # print(a['张三']['科学'])
bros[0]="关羽" # for i in a:
bros[1]="刘备" # for j in a[i]:
print(bros) # print(a[i][j])
\ No newline at end of file # print(a['王五']['数学'])
# a=[
# ['姓名','科学','数学','英语','计算机'],
# ['1',2,3,4,1],
# ['张2三',100,90,80,178],
# ['2',100,90,80,278],
# ['3',100,90,80,378],
# ['4',100,90,80,278],
# ['5',100,90,80,178]
# ]
# a[0].append('总分')
# a[0].append('平均分')
# for i in a[1:]:
# s=0
# for j in i[1:]:
# s+=j
# ave=s/4
# i.append(s)
# i.append(ave)
# print(a)
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