September 2026
1051 pages
35h 4m
English
Sequential data types refers to a class of data types that manage sequences of similar or different elements. The elements stored in sequential data types have a defined order, and they can be accessed through unique indexes.
Python essentially provides the following five sequential types: str, bytes, bytearray, list, and tuple (see Table 12.1).
|
Data Type |
Stores |
Mutability |
Section |
|---|---|---|---|
|
list |
Lists of any instances |
Mutable |
|
|
tuple |
Lists of any instances |
Immutable |
|
|
str |
Text as a sequence of letters |
Immutable |
|
|
bytes |
Binary data as a sequence of bytes |
Immutable |
|
|
bytearray |
Binary data as a sequence of bytes |
Mutable |
Read now
Unlock full access