Zip#
Write a function zip
that takes in two lists and returns a list of paired elements, i.e., zip([x1,x2,x3], [y1,y2,y3])
should return [(x1,y1), (x2,y2), (x3, y3)]
. You should stop whenever either list runs out, e.g., zip([1,2,3], list("abcdefgh"))
should be [(1,'a'), (2, 'b'), (3, 'c')]
.