It's tempting to reach for indexes when working with tuples, lists, and other sequences, but if we know the shape of the tuple we're working with, we can unpack it instead.
Tuple unpacking (aka "multiple assignment" or "iterable unpacking") is often underutilized by new Python programmers.
My name is Trey Hunner. I do corporate Python training for teams and I teach Python online through Python Morsels.
In Python Morsels, I publish a new Python screencast every week.
If you want to learn something new every week, join Python Morsels!Join Python Morsels ✨