Normally, when we create a tuple, we attach values to it. A tuple is “packed” in this way. However, we can also extract the values and store them in variables. This is referred to as the unpacking of tuples in Python.
Example:
fruits = ("cranberry", "blueberry", "apricot")
(green, yellow, red) = fruits
print(green)
print(yellow)
print(red)
Output:
cranberry
blueberry
apricot