CKTIS / Python
typing.Tuple — tuple type annotations
typing.Tuple describes tuple element types. Deprecated since Python 3.9, it should be replaced with tuple[...] in new code.
Version: Python 3.14; repository image, production runtime not attested
Syntax
from typing import Tuple
Tuple[int, str]
Tuple[int, ...]
Tuple[()]
# Python 3.9+: tuple[int, str], tuple[int, ...], tuple[()]typing.Tuple annotates tuples. It has been a deprecated alias for tuple since Python 3.9; in Python 3.14, prefer tuple[...] without an import.
Tuple[int, str] means exactly two elements with those types in that order. Tuple[int] means one element, not an arbitrary number. Tuple[int, ...] allows any number of int elements, including zero; Tuple[()] means only the empty tuple.
Annotations do not validate values during execution; they support static analysis tools. The example demonstrates the older spelling; its modern equivalents are tuple[str, int], tuple[int, ...], and tuple[()].
Examples
from typing import Tuple
record: Tuple[str, int] = ("Ada", 3)
scores: Tuple[int, ...] = (2, 4, 6)
empty: Tuple[()] = ()
print(record)
print(sum(scores))
print(empty)
Result
('Ada', 3)
12
()
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.