Tuple

Tuple

A tuple is basically a set but order and duplication matter.

Tuples are notated with () and an n-tuple has n number of elements.

{1,1,2} = {1,2}
(1,1,2) != (1,2)

Tuples can contain anything (numbers, letters, sets, other ordered pairs) and equality is dependent on order.

Index

Tuples are indexed with math indexing, so 1 is the first element