Dictionaries

We’ve discussed a few of Python’s built-in sequence iterables (e.g. strings, ranges and lists). Now, we consider the built-in non-sequence iterables — dictionaries. A dictionary is an unordered collection which stores key–value pairs that map immutable keys to values, just as a conventional dictionary maps words to definitions. Like a list, a dictionary can be a really useful data structure to use within the programs you write to analyze and visualize data sets.