$ ./guess_the_languageProblem Solving — fill the blank
Problem Solving — fill the blank · hard · #133

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 (also accepted: zip, zip())

zip() pairs elements from each iterable by position.
Play Problem Solving ▸