🔵 🔵 🔵


Primary

၊၊||၊|။

itertools ⚬⃕ᵖʸ|Documentation|1st|20260122192714-00-⌔

itertools — Functions creating iterators for efficient looping — Python 3.14.2 documentation

itertools — Functions creating iterators for efficient looping

This module implements a number of iterator building blocks inspired by constructs from APL, Haskell, and SML. Each has been recast in a form suitable for Python.

The module standardizes a core set of fast, memory efficient tools that are useful by themselves or in combination. Together, they form an “iterator algebra” making it possible to construct specialized tools succinctly and efficiently in pure Python.

For instance, SML provides a tabulation tool: tabulate(f) which produces a sequence f(0), f(1),.... The same effect can be achieved in Python by combining map() and count() to form map(f, count()).

General iterators:

📊 ➺

Combinatoric iterators:

📊 ➺ 📊 ➺

Printed 2026-06-28.

(echo:: @ )

Link to original

Secondary

• • •