Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

The Tuple Type is a fixed size type (i.e.: we cannot remove or add values from/to a tuple) that groups together values of miscellaneous types.

Tuples are declared using parenthesis, and commas to separate values:

(5, 'h', 11.7)

To declare explicitly the types of the values, we use a tuple of types:

(34, 78.56, 'a')

The values of a tuple are indexable:

11.7

We may decompose an existing tuple, by using a tuple of variables inside the let declaration. Some values may be ignored by using the _ (underscore) notation:

'h'