Chapter 9: Dictionaries Flashcards
The algorithm used to implement Python dictionaries.
hash table
A mapping from a set of keys to their corresponding values.
An associative lookup
dictionary
A function used by a hash table to compute the location for a key.
hash function
A set of counters
histogram
A way of performing a computation.
implementation
Another name for a key-value pair.
item
An object that appears in a dictionary as the first part of a pair.
key
The representation of the mapping from a key to a value.
key-value pair
A dictionary operation that takes a key and finds the corresponding value.
lookup
When there are one or more loops “inside” of another loop. The inner loop runs to completion each time the outer loop runs once.
nested loops
An object that appears in a dictionary as the second part of a pair. This is more specific than our previous use of the word.
value
function that creates a dictionary with no items
dict()
dictionary notation
{key : value, etc}
notation to add item to dictionary
dict_name[key] = value
notation to print dictionary value
print(dict_name[key])