On this page
article
Tip #65: Unpack with * and _ for unused values
Python tip #65: Unpack with * and _ for unused values.
Tip
Unpack with * and _ for unused values
Why
Following this practice makes your Python code more readable, maintainable, and less error-prone.
Example
# Before (avoid)
# ... less idiomatic approach ...
# After (prefer)
# ... idiomatic Python 3.10+ approach ...