In this chapter you’ll:
Use dictionaries to represent unordered collections of key–value pairs.
Use sets to represent unordered collections of unique values.
Create, initialize and refer to elements of dictionaries and sets.
Iterate through a dictionary’s keys, values and key–value pairs.
Add, remove and update a dictionary’s key–value pairs.
Use dictionary and set comparison operators.
Combine sets with set operators and methods.
Use operators in
and not
in
to determine if a dictionary contains a key or a set contains a value.
Use the mutable set operations to modify a set’s contents.
Use comprehensions to create dictionaries and sets quickly and conveniently.
Learn how to build dynamic visualizations and implement more of your own in the exercises.
Enhance your understanding of mutability and immutability.