Let’s start this chapter with a definition.
Definition
A data structure is a collection of multiple pieces of data, arranged in a way that the data can be accessed efficiently.
The only data structure we have discussed so far is a list. A list allows us to refer to any one of multiple pieces of data using an index. Python has a few more built-in data structures.
Tuples
Lists of lists
Representing a grid or a spreadsheet
Representing the world of an adventure game
Reading a comma-separated value (.csv) file
Dictionary
Using the in operator on a dictionary ...