Commit 8e342076 by BellCodeEditor

auto save

parent 26b3b1d4
Showing with 33 additions and 2 deletions
arr=["a","b","c","d"]
arr.pop(2)
print(arr)
arr.remove("d")
print(arr)
arr.insert(2,"c")
print(arr)
arr.append("d")
print(arr)
a=["x","y","z"]
arr.extend(a)
print(arr)
\ No newline at end of file
a=["a","b","c","d"]
a.pop(2)
print(a)
a.remove("d")
print(a)
a.insert(2,"c")
print(a)
a.append("d")
print(a)
b=["x","y","z"]
a.extend(b)
print(a)
\ No newline at end of file
a=["a","b","c","d","e","f"]
print(a[:])
print(a[:4])
print(a[1:])
print(a[1:4])
\ No newline at end of file
# 和你的小伙伴用列表讲讲桃园结义的故事,并说说这其中运用了哪些列表知识: # 和你的小伙伴用列表讲讲桃园结义的故事,并说说这其中运用了哪些列表知识:
# 来,我给你起个头~ # 来,我给你起个头~
# 从前啊,有三个bro,分别是:刘备、关羽、张飞... # 从前啊,有三个bro,分别是:刘备、关羽、张飞
bro1="关羽"
bro2="刘备" bro2="刘备"
bro3="张飞" bro3="张飞"
bros=["刘备","关羽","张飞"] 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