Data types in Python
2. Types of Data types
2.5. Sequence data type
A sequence is an ordered collection of values. The sequence is a powerful, fundamental abstraction in computer science. Sequences are not instances of a particular built-in type or abstract data representation, but instead a collection of behaviors that are shared among several different types of data. That is, there are many kinds of sequences, but they all share common behavior. In particular,
Length. A sequence has a finite length. An empty sequence has length 0.
Element selection. A sequence has an element corresponding to any non-negative integer index less than its length, starting at 0 for the first element.
Python includes three main data types that are sequences. They are
- String
- List
- Tuple
"2.3 Sequences" by John DeNero is licensed under CC BY 3.0