+ 1

what do zip. in python

22nd Jun 2016, 10:17 AM
Meri
Meri - avatar
5 Answers
+ 1
It combines 2 or 3 lists together into 1 list and puts the values with the same index side by side in a parenthesis within the new list.
22nd Jun 2016, 5:16 PM
PotatoDrug
PotatoDrug - avatar
+ 1
for example zip(a,b) if a=1 ,2,3 b = 2,6,6 .what is it give us??
22nd Jun 2016, 5:36 PM
Meri
Meri - avatar
+ 1
[(1, 2), (2, 6), (3, 6)]
22nd Jun 2016, 5:42 PM
PotatoDrug
PotatoDrug - avatar
+ 1
No problem :)
22nd Jun 2016, 6:42 PM
PotatoDrug
PotatoDrug - avatar
0
thanks very very much
22nd Jun 2016, 6:24 PM
Meri
Meri - avatar