...

/

Teach Your Code to Remember Lots of Things!

Teach Your Code to Remember Lots of Things!

Learn to store and retrieve labeled data using dictionaries.

So far, you’ve used variables to store single pieces of data and lists to store collections. But what if you want to label your data with keywords? That’s where dictionaries come in—Python’s way of storing key–value pairs!

A dictionary in Python

Think of a dictionary like a real one:

    ...