The Dictionary Data Type
• Like a list, a dictionary is a collection of many values. But
unlike indexes for lists, indexes for dictionaries can use
many different data types, not just integers.
• Indexes for dictionaries are called keys. A key with its
associated value is called a key-value pair.
• A dictionary starts with a curly brace “{“ and ends with a
curly brace “}”.
• Example:
• The dictionary keys are ‘size’, ‘color’, and ‘disposition’. The
values for these keys are ‘fat’, ‘gray’, and ‘loud’,
respectively.
2