johnpaulada
1/23/2017 - 7:12 AM

Recursive array zip with Python.

Recursive array zip with Python.

def zip(a, b):
  if len(a) == 0:
    return []
  else:
    return [[a[0], b[0]]] + zip(a[1:], b[1:])