class typing.Tuple
Tuple type; Tuple[X, Y]
is the type of a tuple of two items with the first item of type X and the second of type Y.
Example: Tuple[T1, T2]
is a tuple of two elements corresponding to type variables T1 and T2. Tuple[int, float, str]
is a tuple of an int, a float and a string.
To specify a variable-length tuple of homogeneous type, use literal ellipsis, e.g. Tuple[int, ...]
.
Please login to continue.