Chap. 9 (Dictionaries) Flashcards
(11 cards)
Define Dictionary
A mapping from a set of keys to their corresponding values.
Define Hashtable
The algorithm used to implement Python dictionaries
Define Hash Function
A function used by the hashtable to compute the location for a key
Define Histogram
A set of counters
Define Implementation
A way of performing a computation
Define Item
Another name for a key value-pair
Define Key
An object that appears in a dictionary as the first part of a Key-value pair
Define Key-value pair
The representation of the mapping from a key to a value
Define Lookup
A dictionary operation that takes a key and finds the corresponding value.
Define Nested Loops
When there are one or more loops “inside” of another loop. The inner loop runs to completion each time the outer loop runs once.
Define Value
An object that appears in a dictionary as the second part of a key-value pair. This is more specific than our previous use of the word “ value”.