yield_all_k_ary_sequences_of_length

sequencetools.yield_all_k_ary_sequences_of_length(k, length)

Yields all k-ary sequences of length.

>>> for sequence in sequencetools.yield_all_k_ary_sequences_of_length(2, 3):
...     sequence
...
(0, 0, 0)
(0, 0, 1)
(0, 1, 0)
(0, 1, 1)
(1, 0, 0)
(1, 0, 1)
(1, 1, 0)
(1, 1, 1)

Returns generator of tuples.