Skip to content
techsnow

Data Structures

Tuples

A tuple is like a list, but it can't be changed after it's created. Use it for fixed groups of values.

point = (10, 20)
rgb = (28, 111, 168)

x, y = point           # unpacking
print(x, y)
print(rgb[0])

Output

10 20
28