Abstract
You’ve seen that lists are useful when you want to group values into a structure and refer to each value by number. In this chapter, you learn about a data structure in which you can refer to each value by name. This type of structure is called a mapping. The only built-in mapping type in Python is the dictionary. The values in a dictionary don’t have any particular order but are stored under a key, which may be a number, a string, or even a tuple.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2008 Magnus Lie Hetland
About this chapter
Cite this chapter
Hetland, M.L. (2008). Dictionaries: When Indices Won’t Do. In: Beginning Python. Apress. https://doi.org/10.1007/978-1-4302-0634-7_4
Download citation
DOI: https://doi.org/10.1007/978-1-4302-0634-7_4
Publisher Name: Apress
Print ISBN: 978-1-59059-982-2
Online ISBN: 978-1-4302-0634-7
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)