BaseCodeByte
Back to Python course
PyCollectionsBeginnerLive Python12 min

Dictionaries

Store structured data with keys and values.

Explanation cell

Dictionaries store data using keys and values. They are useful for user profiles, settings, API responses and structured information.

key/value pairslookupupdating data

Quick tip

Run small edits often. Tiny feedback loops make Python easier to learn.

Common mistake

Most early errors come from unmatched quotes, misspelled names or indentation.

Code cell

Starter code · Ctrl+Enter runs · Ctrl+Shift+Enter tests

Python runtime loads on first run

Output cell

Run your code to see output.

Run your code to see output.

Test cell

Tests run against the actual Python output.

Run tests to check your code against the lesson goals.

Practice cell

Try this

Add a city key and print it.

Expected output

Ada