Tuple
An ordered, immutable sequence - like a list but cannot be changed.
- Hashable when contents are hashable; usable as dict keys.
- Slightly faster and lighter than lists.
- Tuple unpacking is a core Python pattern.
When to use: Fixed-size returns (shapes, indices), dict keys, parallel unpacking.
Example: arr.shape returns a tuple like (1000, 28, 28). cache[(layer, head)] = w_tensor.