sequencetools.yield_all_permutations_of_sequence

abjad.tools.sequencetools.yield_all_permutations_of_sequence.yield_all_permutations_of_sequence(sequence)[source]

New in version 1.1.

Yield all permutations of sequence in lex order:

abjad> from abjad.tools import sequencetools
abjad> 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)]

Return generator of sequence objects.

Changed in version 2.0: renamed listtools.permutations() to sequencetools.yield_all_permutations_of_sequence().

This Page