We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

What Are Data Structures?

A data structure is a data organization, management, and storage format that enables efficient access and modification. More precisely, a data structure is a collection of data values, the relationships among them, and the functions or operations that can be applied to the data.

-- Wikipedia Definition

In other words, a data structure:

  • Stores data
  • Organizes data so that it can easily be accessed and modified
  • Contains algorithmic functions to expose the ability to read and modify the data

You're already familiar with some of Python's built-in, simple data structures:

List: An ordered collection of items

animals = ["cat", "dog", "mouse"]

Dictionary: Collections of key/value pairs

car = {"brand": "Ford", "model": "Mustang", "year": 1964}