Fundamentals25 / 30
Up next

Tuple unpacking

a, b = 1, 2
# swap without a temporary
a, b = b, a
print(a, b)
# star grabs the middle
first, *rest = [1, 2, 3, 4]
print(first, rest)
What you're solving

assign several names at once