yield_all_partitions_of_sequence

sequencetools.yield_all_partitions_of_sequence(sequence)

Yields all partitions of sequence.

>>> sequence = [0, 1, 2, 3]
>>> result = sequencetools.yield_all_partitions_of_sequence(sequence)
>>> for partition in result:
...     partition
...
[[0, 1, 2, 3]]
[[0, 1, 2], [3]]
[[0, 1], [2, 3]]
[[0, 1], [2], [3]]
[[0], [1, 2, 3]]
[[0], [1, 2], [3]]
[[0], [1], [2, 3]]
[[0], [1], [2], [3]]

Returns new object of sequence type.