code: def grouper(iterable, n, fillvalue=None):
      
      if isinstance(iterable, int):
          warnings.warn(
              "grouper expects iterable as first parameter",
              DeprecationWarning,
          )
          n, iterable = iterable, n
      args = [iter(iterable)] * n
      return zip_longest(fillvalue=fillvalue, *args)
docs: Collect data into fixed-length chunks or blocks.
  
          >>> list(grouper('ABCDEFG', 3, 'x'))
          [('A', 'B', 'C'), ('D', 'E', 'F'), ('G', 'x', 'x')]