Let's talk about extended iterable unpacking.
Tuple unpacking is great when you know the size of the iterable you're unpacking.
For example, here we're unpacking a three-item tuple (called coordinates
) into three variables:
...
This is a premium screencast available only to active Python Morsels subscribers.
Feel free to watch some of the free screencasts in the Tuple Unpacking series.
Need to fill-in gaps in your Python skills? I send weekly emails designed to do just that.