yield_all_permutations_of_sequence

sequencetools.yield_all_permutations_of_sequence(sequence)

Yields all permutations of sequence.

>>> list(sequencetools.yield_all_permutations_of_sequence((1, 2, 3)))
[(1, 2, 3), (1, 3, 2), (2, 1, 3), (2, 3, 1), (3, 1, 2), (3, 2, 1)]

Yields permutations in lex order.

Returns generator.