Commit 322cc306 by BellCodeEditor

save project

parent e29fddab
Showing with 26 additions and 0 deletions
b = ["曹操","张飞","刘备","关羽"]
b.remove("关羽")
# b.pop(3)
# b.pop(-1)
print(b)
\ No newline at end of file
a= ["华雄"]
c=["颜良","文丑"]
a.extend(c)
print(a)
b= ["华雄"]
b.insert(1,"关羽")
# 或者使用b.append("关羽")
print(b)
\ No newline at end of file
a = ["刘备","公孙瓒","曹操","张飞","关羽","袁术"]
print(a[:])
print(a[:4])
print(a[1:])
print(a[1:4])
\ No newline at end of file
a=["吕布"]
b=["袁术","公孙瓒","关羽","张飞","刘备","曹操"]
a.extend(b[2:5])
print(a)
\ 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