Commit 3c35b9b0 by BellCodeEditor

save project

parent 1e2ce349
Showing with 5 additions and 18 deletions
# 和你的小伙伴用列表讲讲桃园结义的故事,并说说这其中运用了哪些列表知识:
# 来,我给你起个头~
# 从前啊,有三个bro,分别是:刘备、关羽、张飞...
bro1="刘备"
bro2="关羽""
bro3="张飞"
#他们来到了桃园准备结拜
bros=["刘备","关羽","张飞"]
#酒也备好了,誓言也准备好了,得排个辈分,三个人的信息卡
bro1=["刘备",161,9.1]
bro2=["关羽",160,8.5]
bro3=["张飞",166,8.3]
#虽然呢,看起来关羽最年长,但是刘备的综合水平最强,所以,关羽一抱拳,甘为老二,刘备就成了大哥。
#结拜,大哥自然
bros[0]="关羽"
bros[1]="刘备"
print(bros)
\ No newline at end of file
b=['袁术','夏侯惇','曹超','关羽']
b.pop(3
b.pop(-2)
b.remove(关羽))
\ 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