Containers

The Python Standard Library, as well as the Python programming language itself, contains several different classes specifically designed to store data. All together, they are generically referred to as collections since they are used to store a “collection” of data.

Python contains implementations for several different data structures, which are classes used to store and manipulate data in specific ways. We’ll learn more about how each of these implementations works and differs in a later course, but in this course, we’ll quickly describe a few of the most common ones. Specifically, we’ll discuss these three data structures:

  • Lists
  • Dictionaries
  • Tuples
Python Collections Module

Properly, Python refers to these types of items as “containers”, not collections. Containers are all instances of the collections.Container interface. The collections module contains several additional containers.