Commit a5dd72dc by BellCodeEditor

save project

parent 7bbfb0d8
Showing with 9 additions and 13 deletions
# 和你的小伙伴用列表讲讲桃园结义的故事,并说说这其中运用了哪些列表知识: # 和你的小伙伴讲讲史上有名的三英战吕布的故事。然后完成下面挑战,并说说列表切片是什么,怎么用:
# 来,我给你起个头~
# 从前啊,有三个bro,分别是:刘备、关羽、张飞... # 省略繁杂情节,刘关张三人一起冲入战场,围攻吕布:
bro1="关羽" a=['吕布']
bro2="刘备" b=['袁术','公孙瓒','关羽','张飞','刘备','曹操']
bro3="张飞" c=b[2:5]
bros=["刘备","关羽","张飞"] a.extend(c)
bro1=["关羽",160,8.5] print(a)
bro2=["刘备",161,9.1] \ No newline at end of file
bro3=["张飞",166,8.3]
bros[0]="关羽"
bros[1]="刘备"
print(bros)
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