Unpacking Lists and Tuples in Python

Unpack multiple values, ignore some, handle errors, and more

Indhumathy Chelliah
Better Programming
Published in
3 min readMar 9, 2021

--

Little reindeer figures on the floor
Photo by Markus Spiske on Unsplash.

Packing means collecting several values into a single variable (tuple), like
a=’red’,’square’,’apple’. Unpacking means extracting those values into different variables, like color,shape,fruit = a.

--

--