code: def split_every(parts, iterable):
      
      return takewhile(bool, (list(islice(iterable, parts)) for _ in count()))
docs: Split an iterable into parts of length parts
  
      >>> l = iter([1, 2, 3, 4])
      >>> split_every(2, l)
      [[1, 2], [3, 4]]
  
      :param iterable: iterable to split
      :param parts: number of chunks
      :return: return the iterable split in parts