🔵 🔵 🔵


Primary

၊၊||၊|။

itertools.chain() ⚬|Documentation|1st|20260122195929-00-⌔

itertools — Functions creating iterators for efficient looping — Python 3.14.2 documentation#itertools.chain

itertools.chain(﹡iterables)

Make an iterator that returns elements from the first iterable until it is exhausted, then proceeds to the next iterable, until all of the iterables are exhausted. This combines multiple data sources into a single iterator. Roughly equivalent to:

def chain(﹡iterables):
   # chain('ABC', 'DEF') → A B C D E F
   for iterable in iterables:
       yield from iterable

Printed 2026-06-28.

(echo:: @ )

Link to original

Secondary

• • •