#iterables

[ follow ]
#python
fromMathspp
4 days ago
Python

Who wants to be a millionaire: iterables edition

A Python quiz themed around iterables was presented at PyCon Lithuania 2026, featuring four questions and a performance.
Python
fromMathspp
4 days ago

Who wants to be a millionaire: iterables edition

A Python quiz themed around iterables was presented at PyCon Lithuania 2026, featuring four questions and a performance.
fromMathspp
4 months ago

Generalising itertools.pairwise

itertools.pairwise is an iterable from the standard module itertools that lets you access overlapping pairs of consecutive elements of the input iterable. That's quite a mouthful, so let me translate: You give pairwise an iterable, like "ABCD", and pairwise gives you pairs back, like ("A", "B"), ("B", "C"), and ("C", "D"). In loops, it is common to unpack the pairs directly to perform some operation on both values.
Python
JavaScript
fromSmashing Magazine
5 months ago

JavaScript For Everyone: Iterators - Smashing Magazine

Iterables implement a [Symbol.iterator]() method to produce iterators; iterators follow the iterator protocol and allow sequential element access (usable by for...of).
[ Load more ]