1.添加元素
(1)append
(2)extend
(3)insert
2.修改元素
3.查找元素
(1)in,not in
(2)index
list.index(element,start=0,end=len(list))----參考字符串中index的使用
(3)count
list.count(element,start=0,end=len(list))
4.刪除元素
(1)del:根據下標進行刪除
(2)pop:刪除最後一個元素
(3)remove:根據元素的值進行刪除
5.排序
1.添加元素
(1)append
(2)extend
(3)insert
2.修改元素
3.查找元素
(1)in,not in
(2)index
list.index(element,start=0,end=len(list))----參考字符串中index的使用
(3)count
list.count(element,start=0,end=len(list))
4.刪除元素
(1)del:根據下標進行刪除
(2)pop:刪除最後一個元素
(3)remove:根據元素的值進行刪除
5.排序
1.while循環的格式 while 條件: 條件滿足時,做的事情1 條件滿足時,做的事情2 條件滿足時,做的事情3 ...(省略)... demo