Commit 84d8fe59 by BellCodeEditor

auto save

parent 14feb2d3
Showing with 18 additions and 2 deletions
......@@ -10,4 +10,20 @@ bro2=["刘备",161,9.1]
bro3=["张飞",166,8.3]
bros[0]="关羽"
bros[1]="刘备"
print(bros)
\ No newline at end of file
print(bros)
'''
# 列表中删除元素的方法:
1. 列表名.pop() 用来删除指定位置的元素,括号里填要删除元素的索引值
2. remove() 用来删除某一个元素,括号里填要删除的那个元素
#列表中增加元素的方法:
1. 列表名.insert(索引,内容) 在指定位置插入元素
2. 列表名.append(内容) 在列表末尾增加元素,只能增加一个
3. 列表名.extend(列表) 在列表末尾追加多个元素
'''
\ 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