-2
data = [['a', 'b', 'c', 'd'], [1, 2, 3, 4], [4, 5, 6, 7]]
result = zip(data[0], data[1], data[2])

Can I put elements into zip using for loop instead manually with index number?

231412 412389421
  • 303
  • 2
  • 13

1 Answers1

3

You can use * to expand the list as arguments:

result = zip(*data)
Daniel Roseman
  • 588,541
  • 66
  • 880
  • 895