λ Functional Python
itertools Essentials
count, cycle, chain, islice, groupby — composable iterator tools.
itertools ships powerful, memory-efficient building blocks for working with iterators.
from itertools import islice, count, chain
first5 = list(islice(count(10, 2), 5)) # [10, 12, 14, 16, 18]
joined = list(chain([1, 2], [3, 4])) # [1, 2, 3, 4]
groupby clusters consecutive equal items; accumulate produces running totals; product yields cartesian combinations.