python 之 Sequence Types — list, tuple, range

python有不同的序列类型,三个基本的为list, tuple, range; string 与 dictionary 单独去解析。

关于这一块,标准库的文档讲的非常好,没必要再贴过来
Sequence Types — list, tuple, range
Lists
Tuples
Ranges

有几点概括一下,由于sequence type 分为 mutable and immutable type, 文档可以参考: The standard type hierarchy

这三个类型中, list 为 mutable type. tuple 与 range 为 immutable type. 文档中大致总结了一些用法。
包括 Common Sequence Operation
Immutable Sequence Types
Mutable Sequence Types
所以不同的类型参考不同的用法,非常的方便。

posted on 2015-09-09 19:07  OA_maque  阅读(423)  评论(0编辑  收藏  举报

导航