Commit a5de4d19 by BellCodeEditor

save project

parent 200af255
Showing with 6 additions and 28 deletions
a=['苹果','香蕉','西瓜','香蕉','桃子','香蕉'] a=['华雄']
a.remove("香蕉") a.append('颜良')
a.remove("香蕉") a.append('文丑')
a.remove("香蕉")
print(a) print(a)
a=['苹果','香蕉','西瓜','香蕉','桃子','香蕉'] a=['华雄']
a.pop(1) b=['颜良','文丑']
a.pop(2) a.extend(b)
a.pop(3)
print(a) print(a)
a=['苹果','香蕉','西瓜','香蕉','桃子','香蕉']
a.pop(-1)
a.pop(-2)
a.pop(-3)
print(a)
b=['袁术','夏侯惇','曹操','关羽']
b.pop(3)
print(b)
b=['袁术','夏侯惇','曹操','关羽']
b.pop(-1)
print(b)
b=['袁术','夏侯惇','曹操','关羽']
b.remove("关羽")
print(b)
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