code: def grouper(num, iterable, fillvalue=None):
      "Collect data into fixed-length chunks or blocks"
      # grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx
      args = [iter(iterable)] * num
      return zip_longest(fillvalue=fillvalue, *argsf grouper(num, iterable, fillvalue=None):
      "Collect data into fixed-length chunks or blocks"
      # grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx
      args = [iter(iterable)] * num
      return zip_longest(fillvalue=fillvalue, *args)
docs: Collect data into fixed-length chunks or blocks