Stefan Pochmann

24,379
reputation
7
36
92

itertools.groupby explained.

Really nice: [2, a, b, 1, c, 3, d, e, f][[2, a, b], [1, c], [3, d, e, f]]

Really silly: List comprehension with state.