On this page
article
itertools — Iterator Functions
chain, combinations, permutations, cycle.
Overview
chain, combinations, permutations, cycle.
Quick Example
list(itertools.combinations([1,2,3], 2))
When to Use
Use this module when you need built-in support without adding third-party dependencies.
Common Tasks
- Read the official docs: docs.python.org/3/library/itertools.html
- Combine with related modules in the Cookbook
- Prefer stdlib before reaching for PyPI packages