Due to issues with the Internet.ee domain registry, our main domain, paste.ee, is currently disabled due to abuse reports. We are looking into alternative domains to continue operation, but for now the pastee.dev domain is the primary domain.
If you wish to blame someone, blame the scum using this site as a malware host.
Description: Implementation of combo()
Submitted on February 22, 2015 at 09:34 PM

Section 1 (Python)

# combo(['swallow', 'snake', 'parrot'], 'abc')
# Output:
# [('swallow', 'a'), ('snake', 'b'), ('parrot', 'c')]
# If you use list.append(), you'll want to pass it a tuple of new values.
# Using enumerate() here can save you a variable or two.

# It helps seeing what it should look like before:
# combo(['swallow', 'snake', 'parrot'], 'abc')
# ...and the result after:
# [('swallow', 'a'), ('snake', 'b'), ('parrot', 'c')]

def combo(one, two):
  results = []
  for step, value in enumerate(two): # same length, remember?
    results.append((one[step], value))
  return results