6.7.7. grouper

grouper(iterable, n)[source]

Collect data into fixed-length chunks or blocks.

Parameters:
  • iterable – Iterable object.
  • iterable – iter
  • n (int) – Length chunks or blocks.