관리자

Make pairs

returns iterator

x = ['a', 'b', 'c']
y = [1, 2]

zipped = list(zip(x, y))
# [('a', 1), ('b', 2)]

x2, y2 = zip(*zip(x, y))
# x2 = ['a', 'b']
# y2 = [1, 2]

 

+ Recent posts