In the other direction, e.g.,
def expand_rle(rle): from itertools import repeat, chain return list(chain.from_iterable(repeat(x, n) for x, n in rle))
expand_rle([('a', 5), ('bc', 3)]) ['a', 'a', 'a', 'a', 'a', 'bc', 'bc', 'bc']
As to why zip is in the distribution, but not RLE, zip is a very widely used, general purpose, compression standard. RLE is a special-purpose thing.