If you have a collection of values in a list, tuple etc. Python allows you to extract the values into variables. This is called unpacking.
This is also called de-structuring in javascript.
example
fruits = ["apple", "banana", "cherry"] x, y, z = fruits print(x) print(y) print(z)
Leave a Reply