A hash table is a data structure that supports fast lookup, insertion, and deletion by using ahash functionto map keys to positions in an underlying storage structure. In Python, the built-in data structure that provides hash-table behavior is thedictionary, written with curly braces like {"a": 1, "b": 2}. Dictionaries store key–value pairs and are designed so that accessing a value by key, such as d["a"], is efficient on average. Textbooks typically describe this expected efficiency as average-case constant time, often written as O(1), assuming a good hash function and a well-managed table size.
Tuples and lists are sequence types. Lists provide indexed access by integer position, not hashing by arbitrary keys. Tuples are immutable sequences and likewise do not provide key-based hashing semantics. “Array” is not the core built-in mapping structure in Python; while Python has an array module and NumPy has arrays, neither is the built-in hash table abstraction for general key–value storage.
Python dictionaries require keys to be hashable, meaning the key’s hash value is stable during its lifetime (common examples: strings, numbers, tuples of hashable items). This requirement is directly tied to hash-table implementation. Dictionaries are used throughout computer science applications: symbol tables in interpreters, caches and memoization, frequency counting, indexing, and implementing graphs via adjacency maps.