The Python Data Structure Categories Series

We often focus on learning about data structures such as lists, dictionaries, tuples, and so on. But understanding the categories they belong to is just as important, especially in a duck-typing language such as Python.

Here are all the articles in this series on data structure categories:

  1. Iterable: Python's Stepping Stones

  2. Sequences in Python

  3. Finding Your Way To The Right Value • Python's Mappings

  4. An Object That Contains Objects • Python's Containers

  5. Collecting Things • Python's Collections

  6. A One-Way Stream of Data • Iterators in Python

  7. Pay As You Go • Generate Data Using Generators

Overview of the series:

The series looks at features that are common to many data structures. We start with a “top level” characteristic and look at what it means to be iterable.

Then we look at two categories that are further down in the hierarchy, sequences and mappings. Both of these are also iterable, for example. This is what I mean when I say they’re further down!

We climb up to the top again with containers. The article on containers also talks about another category, sized objects.

Many data structures are iterable, sized containers. The following article talks about these collections.

Finally, we move to a different branch of the data structure categories map and talk about iterators and generators

Data structure categories in Python