Typically the arrays you zip together are all about the same logical item. Eg, in the above example
perhaps a is size and b is colour. So thing #1 (at array index 0) is a red thing of size 1. Before
zipping we'd access it by a[0] and b[0]. After zipping, we'd have c[0], which is array of [1, red].
Zip combines the elements of two or more arrays based on their index.
Typically the arrays you zip together are all about the same logical item. Eg, in the above example perhaps
a
is size andb
is colour. So thing #1 (at array index 0) is a red thing of size 1. Before zipping we'd access it bya[0]
andb[0]
. After zipping, we'd have c[0], which is array of [1,red
].