6. Dictionaries and Sets
Objectives
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 ...
Get Python for Programmers now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.