items = ['Alpha', 'Beta', 'Gamma', 'Delta', 'Epsilon'] source = rx.from_(items) stream = source.pipe( ops.group_by(lambda s: len(s)), ops.flat_map(lambda g: g.pipe( ops.to_list() )), ) stream.subscribe(lambda s: print(s))