Python Fundamentals ยท Collections
Tuples are fixed-size, unchangeable groups. Unpack them into names, swap two values in one line, and collect "the rest" with a star.
point = (3, 4)
x, y = point # unpacking: one name per item
a, b = 1, 2
a, b = b, a # swap without a temporary name
first, *rest = [10, 20, 30, 40]
size = len(point)
print(x, y, a, b, first, rest, size)a is created with the value 1. b is created with the value 2.size is created with the value 2.