Skip to content

Instantly share code, notes, and snippets.

@Kuri-su
Created February 4, 2018 16:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kuri-su/d7aa690241271dc6ada32851f514afd6 to your computer and use it in GitHub Desktop.
Save Kuri-su/d7aa690241271dc6ada32851f514afd6 to your computer and use it in GitHub Desktop.
py 序列(Sequence) 介绍
序列的主要功能是资格测试(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