Discover Python, Part 7, Explore the Python type hierarchy
How to use dictionaries successfully
From the developerWorks archives
Date archived: January 4, 2017 | First published: December 06, 2005
This article returns to the exploration of the Python type hierarchy and introduces the Python
dictionary container type. Unlike the Python
list container types discussed in previous articles, the
dictionary type is an unordered container that relies on a key-to-value mapping. As a result, items in a dictionary are accessed by a key value and not by their location within a sequence. The unique features of the
dictionary type may seem unusual, but they provide a great deal of power when used properly.
This content is no longer being updated or maintained. The full article is provided "as is" in a PDF file. Given the rapid evolution of technology, some steps and illustrations may have changed.