Built-in Data Structures: Dictionaries
A dictionary is an unordered collection of objects indexed by keys (known as a hash in perl -- that's what I called it last class)
Any object can be a key
Any object can be a item indexed by a key
Dictionaries are mutable
Examples
{} Empty dictionary
{'item':'tire','price':20.99} Two-element dictionary
Previous slide
Next slide
Back to first slide
View graphic version