Lesson 822 of 1524
Dictionaries
A dictionary in Python is a container object including key-value pairs
Practice this chapterA dictionary in Python is a container object including key-value pairs The dict type implements a dictionary in Python
A dictionary is a mutable object but keys in the dictionary must be immutable objects
dictionary — a mutable object but keys in the dictionary must be immutable objects. dictionary in Python — a container object including key-value pairs.
Be able to describe the structure of a dictionary object; use type () to identify the type of a dictionary object; explain why a dictionary object does not have duplicate key values.
Worked example
What does “dictionary” mean in Dictionaries?
- 1Use the wording this chapter gives for dictionary.
- 2The book says: a mutable object but keys in the dictionary must be immutable objects.
- 3Do not use the meaning of dictionary in Python. That term means a container object including key-value pairs.
Result: a mutable object but keys in the dictionary must be immutable objects
Why. That is the meaning this chapter gives for dictionary.
Do not swap dictionary and dictionary in Python. dictionary means a mutable object but keys in the dictionary must be immutable objects. dictionary in Python means a container object including key-value pairs.
Practice margin
This chapter
A fresh set from this chapter only. Choose 10 or 20. Multiple choice and fill-in, with no repeat inside the set.