More Itertools

10.8.0 · active · verified Sat Mar 28

A Python package offering additional routines for working with iterables, extending beyond the standard itertools module. Current version: 10.8.0. Maintained with regular updates to enhance functionality and performance.

Warnings

Install

Imports

Quickstart

Demonstrates the 'chunked' function to divide an iterable into chunks of specified size.

from more_itertools import chunked

iterable = [0, 1, 2, 3, 4, 5, 6, 7, 8]
result = list(chunked(iterable, 3))
print(result)

# Output:
# [[0, 1, 2], [3, 4, 5], [6, 7, 8]]

view raw JSON →