Starred unpacking separates a fixed header from a variable-length tail. It still requires enough elements for the fixed positions.
Worked example
first, *middle, last = [1, 2, 3, 4]
print(first, middle, last)Result
1 [2, 3] 4Implementation notes
The remainder binding is a new list, even when it contains just one element. That distinction matters when forwarding the unpacked fields into another function.
Try it yourself
Compare a header-only record with a completely empty record.
Open the Python example →Editorial date September 7, 2026 · Published December 6, 2026