I would like to zip two arrays in C++ (as in Python) using a standard library function, so is there any equivalent for Python's built-in function zip()?
Asked
Active
Viewed 8,198 times
5
-
1I would explain what `zip` does. Not everyone knows Python. – Blender Jun 25 '13 at 00:04
-
1For anybody that doesn't know, `zip()` is a transpose operation: It'll take a list: `[[1,2],[3,4]]`, and return `[[1,3],[2,4]]` – James Jun 25 '13 at 00:14
-
6@Imagine Strictly speaking, it would return `[(1, 3), (2, 4)]` :p – TerryA Jun 25 '13 at 00:47