Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Dear Python. Parent comment
>>> from itertools import cycle >>> iter = cycle(['red', 'green', 'blue']) >>> iter.next() 'red' >>> iter.next() 'green' >>> iter.next() 'blue' >>> iter.next() 'red'