1/3
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
What is a dictionary in Python?
An unordered, changeable collection of key–value pairs, with unique keys.Dictionaries are used to store data values like a map, in which a key is associated with a value.
How to create a dictionary?
d = {'a': 1, 'b': 2} or d = dict(a=1, b=2).
How to create an empty dictionary?
d = {}.
How to access a value by key?
d['a'] returns the value for key 'a'.