Python – Unpack Tuples

Unpacking a Tuple

When we create a tuple, we normally assign values to it. This is called “packing” a tuple:

Example

Packing a tuple:

fruits = ("apple", "banana", "cherry")

But, in Python, we are also allowed to extract the values back into variables. This is called “unpacking”: Continue reading Python – Unpack Tuples