That doesn't mean you make a .zip. The story of the zip of the person who joins the list.
The behavior of the zip function looks like this
>>> list1 = [1,2,3,4]
>>> list2 = [5,6,7,8]
>>> list3 = zip(list1,list2)
>>> list3
[(1, 5), (2, 6), (3, 7), (4, 8)]
So, if I can zip it, I would like to unzip it, but python doesn't have an unzip function! So, when you want to unzip, you should use variable variables.
>>> zip(*list3)
[(1, 2, 3, 4), (5, 6, 7, 8)]
Recommended Posts