Module 5

Tuples

Immutable sequences.

Lists that cannot change

A tuple is like a list, but it cannot be changed after you create it. You use parentheses instead of square brackets.

Python
base_pair = ("A", "T")
print(base_pair[0])
print(len(base_pair))
A 2
Try it

Use tuples when the data should not change. A base pair (A, T) is a good example: it always has two elements.