AI engineering glossary · Python core

What is dictionary?

Dictionary (also called dict): A mutable collection of key-value pairs, written in curly braces with colons, where each unique key maps to a value. Lookup by key is very fast on average. Since Python 3.7 a dictionary remembers the order in which keys were inserted.

Level: beginnerTopic: Python core

Dictionary: an example

student = {'name': 'Kiran', 'age': 22}; student['name'] gives 'Kiran'; student['city'] = 'Kochi' adds a new pair.

Related terms

More Python core terms

Where you learn it

Dictionary is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.