12. Dictionaries and Sets

How would you like to be able to give a key value—such as a name—and have Python find the corresponding value for you? How would you like to be able to have the language carry out searches at lightning speed?

That’s what Python data dictionaries do. They potentially solve many programming problems by creating something like a rudimentary database.

This chapter explores dictionaries and sets by covering the following topics:

Image Setting up a simple dictionary

Image Loading and saving to disk files

Operations on sets

Why Do We Need ...

Get Python Without Fear 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.