自带帮助文档:

>>> help(list)
Help on class list in module builtins: class list(object)
| list() -> new empty list
| list(iterable) -> new list initialized from iterable's items
|
| Methods defined here:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return key in self.
|
| __delitem__(self, key, /)
| Delete self[key].
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(...)
| x.__getitem__(y) <==> x[y]
|
| __gt__(self, value, /)
| Return self>value.
|
| __iadd__(self, value, /)
| Implement self+=value.
|
| __imul__(self, value, /)
| Implement self*=value.
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mul__(self, value, /)
| Return self*value.n
|
| __ne__(self, value, /)
| Return self!=value.
|
| __new__(*args, **kwargs) from builtins.type
| Create and return a new object. See help(type) for accurate signature.
|
| __repr__(self, /)
| Return repr(self).
|
| __reversed__(...)
| L.__reversed__() -- return a reverse iterator over the list
|
| __rmul__(self, value, /)
| Return self*value.
|
| __setitem__(self, key, value, /)
| Set self[key] to value.
|
| __sizeof__(...)
| L.__sizeof__() -- size of L in memory, in bytes
|
| append(...)
| L.append(object) -> None -- append object to end
|
| clear(...)
| L.clear() -> None -- remove all items from L
|
| copy(...)
| L.copy() -> list -- a shallow copy of L
|
| count(...)
| L.count(value) -> integer -- return number of occurrences of value
|
| extend(...)
| L.extend(iterable) -> None -- extend list by appending elements from the iterable
|
| index(...)
| L.index(value, [start, [stop]]) -> integer -- return first index of value.
| Raises ValueError if the value is not present.
|
| insert(...)
| L.insert(index, object) -- insert object before index
|
| pop(...)
| L.pop([index]) -> item -- remove and return item at index (default last).
| Raises IndexError if list is empty or index is out of range.
|
| remove(...)
| L.remove(value) -> None -- remove first occurrence of value.
| Raises ValueError if the value is not present.
|
| reverse(...)
| L.reverse() -- reverse *IN PLACE*
|
| sort(...)
| L.sort(key=None, reverse=False) -> None -- stable sort *IN PLACE*
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __hash__ = None >>>

  

Python列表操作的更多相关文章

  1. Python列表操作大全(非常全)

    Python列表操作大全(非常全!!!) 对于python列表的理解可以和C语言里面的数组进行比较性的记忆与对照,它们比较相似,对于python里面列表的定义可以直接用方括号里加所包含对象的方法,并且 ...

  2. python第七篇:Python 列表操作详解

    Python列表操作详解 list函数 list()   #生成一个空的列表 list(iterable)  #用可迭代对象初始化一个列表 列表的 and 运算和 or 运算 列表and运算 > ...

  3. python列表操作大全

    Python列表操作大全 对于python列表的理解可以和C语言里面的数组进行比较性的记忆与对照,它们比较相似,对于python里面列表的定义可以直接用方括号里加所包含对象的方法,并且python的列 ...

  4. Python列表操作集合

    对于python列表里元素的操作主要分为以下几个方面: 1.向列表里面加元素: 向python列表里面添加元素主要有三种方法: (1)append() append()对于列表的操作主要实现的是在特定 ...

  5. python列表操作总结

    list是python中非常重要的类型/数据结构,总结如下: 符号说明 l:列表 l2:新列表 e:元素 index:位置 方法: 原地修改: l.append(e) l.insert(index, ...

  6. Python列表操作常用API

    1.列表的概念 (1)列表的定义 列表是Python中一种基本的数据结构.列表存储的数据,我们称为元素.在列表中的每个元素都会有一个下标来与之对应,第一个索引是0,第二个索引是1,依此类推的整数. 列 ...

  7. Python—列表操作

    列表 列表的使用: 列表是可变数据类型,因此列表的方法,都是直接修改列表原始值 list = ["panda","chimpanzee","zebra ...

  8. Python列表操作与深浅拷贝(6)——列表索引、查询、修改、扩展

    列表list定义 L1 = [] L2 = [1,2,'abc'] L3 = list() L4 = list(range(5)) L5 = [1,'abc',True,None,[4,5,'abc' ...

  9. Python列表操作与深浅拷贝(5)——数字处理函数、类型判断、列表链表队列栈

    python内建数据结构 分类 数值型: int float complex bool 序列对象: 字符串str 列表list 元组tuple 键值对: 集合set 字典dict 数值型 (list ...

  10. python——列表操作函数和方法

    1.添加新元素 1.1 append()函数 描述:append() 方法用于在列表末尾添加新的对象. 语法:list.append(obj) 参数:obj -- 添加到列表末尾的对象. 返回值:该方 ...

随机推荐

  1. 51Nod 1108 距离之和最小 V2 1096 距离之和最小 中位数性质

    1108 距离之和最小 V2基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题 收藏 关注三维空间上有N个点, 求一个点使它到这N个点的曼哈顿距离之和最小,输出这个最小 ...

  2. PHP实现excel

    导入 public function excel_put(){ //先做一个文件上传,保存文件 $path=$_FILES['file']; $filePath = "uploads/&qu ...

  3. phython廖雪峰

    这是小白的Python新手教程,具有如下特点: 中文,免费,零起点,完整示例,基于最新的Python 3版本. Python是一种计算机程序设计语言.你可能已经听说过很多种流行的编程语言,比如非常难学 ...

  4. GIL(全局解释器锁)

    引入 现在绝大部分的Python都是CPython解释器(但不是必须使用CPython解释器),而CPython的一个特性就是有GIL,作用保证解释器级别的代码在运行时不被其他的线程进行修改,即加锁处 ...

  5. 使用pg_buffercache查看缓存区缓存

    PG提供了一个扩展pg_buffercache来查看缓存区的内容. create database test; CREATE DATABASE create extension pg_bufferca ...

  6. Machine Learning - XV. Anomaly Detection异常检測 (Week 9)

    http://blog.csdn.net/pipisorry/article/details/44783647 机器学习Machine Learning - Andrew NG courses学习笔记 ...

  7. JavaScript 插件的书页翻转效果

    Flipbooks书页面翻转成为在网页设计中最流行的交互动画之中的一个. 他们能够用在 Flash,网页或者在线杂志中.使用书页动画或者页面翻转的网页设计效果展示他们的产品,更加直观有效. 结合 HT ...

  8. [UI列表]LoopScrollRect无限滑动不卡顿

    应用场景 对于背包界面,排行榜列表,聊天消息,等有大量的UI列表的界面,常规做法是为每一条数据生成一个格子,在数据量越大的情况下,会生成越来越多的Gameobject,引起卡顿. 这篇文章讲述的就是解 ...

  9. maven安装配置及使用maven创建一个web项目

    今天开始学习使用maven,现在把学习过程中的资料整理在这边. 第一部分.maven安装和配置. http://jingyan.baidu.com/article/295430f136e8e00c7e ...

  10. MVC(二)

    一: 在新接触MVC的时候可以先使用VS建一个MVC项目(不是空项目哟),MVC特别人性化的建一个示例,展示了MVC项目的基本组成.如下: App_Data 数据库文件,需根据数据库变动而变更. Ap ...