code: def split_by_count(items, count, filler=None):
      
      if filler is not None:
          items = items[:]
          while len(items) % count:
              items.append(filler)
      iterator = iter(items)
      iterators = [iterator] * count
      return list(zip(*iterators))
docs: Split the items into tuples of count items each
  
      >>> split_by_count([0,1,2,3], 2)
      [(0, 1), (2, 3)]
  
      If there are a mutiple of count items then filler makes no difference
      >>> split_by_count([0,1,2,7,8,9], 3, 0) == split_by_count([0,1,2,7,8,9], 3)
      True
  
      If there are not a multiple of count items, then any extras are discarded
      >>> split_by_count([0,1,2,7,8,9,6], 3)
      [(0, 1, 2), (7, 8, 9)]
  
      Specifying a filler expands the "lost" group
      >>> split_by_count([0,1,2,7,8,9,6], 3, 0)
      [(0, 1, 2), (7, 8, 9), (6, 0, 0)]