Created
February 4, 2018 16:53
-
-
Save Kuri-su/d7aa690241271dc6ada32851f514afd6 to your computer and use it in GitHub Desktop.
py 序列(Sequence) 介绍
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
序列的主要功能是资格测试(Membership Test)(也就是 in 与 not in 表达式)和索引操作(Indexing Operations),它们能够允许我们直接获取序列中的特定项目。 | |
上面所提到的序列的三种形态——列表、元组与字符串,同样拥有一种切片(Slicing)运算符,它能够允许我们序列中的某段切片——也就是序列之中的一部分。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment