Discover Python, Part 7, Explore the Python type hierarchy

How to use dictionaries successfully

From the developerWorks archives

Robert Brunner

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 tuple, string, and 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.



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Open source
ArticleID=99820
ArticleTitle=Discover Python, Part 7: Explore the Python type hierarchy
publish-date=12062005