python list
来源:互联网 发布:iptv管理系统php制作 编辑:程序博客网 时间:2024/05/21 07:46
- list.append(x)
Add an item to the end of the list. Equivalent to a[len(a):] = [x].
- list.extend(L)
Extend the list by appending all the items in the given list. Equivalent to a[len(a):] = L.
- list.insert(i, x)
Insert an item at a given position. The first argument is the index of the element before which to insert, so a.insert(0, x) inserts at the front of the list, and a.insert(len(a), x) is equivalent to a.append(x).
- list.remove(x)
Remove the first item from the list whose value is x. It is an error if there is no such item.
- list.pop([i])
Remove the item at the given position in the list, and return it. If no index is specified, a.pop() removes and returns the last item in the list. (The square brackets around the i in the method signature denote that the parameter is optional, not that you should type square brackets at that position. You will see this notation frequently in the Python Library Reference.)
- list.index(x)
Return the index in the list of the first item whose value is x. It is an error if there is no such item.
- list.count(x)
Return the number of times x appears in the list.
- list.sort()
Sort the items of the list in place.
- list.reverse()
Reverse the elements of the list in place.
del
del list[index]
- Python List:
- python list
- python list
- python list
- Python.list
- Python list
- python list
- Python List
- Python List
- python list
- Python---list
- python-list
- python list
- python list
- python list
- Python List
- Python list
- python list
- dm9000 晶振测不准
- POJ 2632 模拟
- 搭建博客
- 总结一下页面中文传输的编码问题
- Java基础强化之数组
- python list
- 我为什么喜欢Go语言
- 《计算机网络 1》 整体具览
- 高手谈二级缓存
- python匆匆结束
- linux内核中断实现机制
- ARM Linux静态映射分析
- 跨站脚本攻击 XSS简介
- 今生的梦