What goes in the blank?
# returns pairs of corresponding elements from a and b
def pair_up(a, b):
return list(____(a, b))
# pair_up([1,2],["x","y"]) -> [(1,"x"),(2,"y")]
Answer: zip
zip() pairs elements from each iterable by position.
Play Problem Solving ▸