repeat_sequence

sequencetools.repeat_sequence(sequence, n)

Repeats sequence n times.

Example 1. Repeats tuple three times:

>>> sequencetools.repeat_sequence((1, 2, 3, 4, 5), 3)
(1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5)

Example 2. Repeats tuple zero times:

>>> sequencetools.repeat_sequence((1, 2, 3, 4, 5), 0)
()

Example 3. Repeats list three times:

>>> sequencetools.repeat_sequence([1, 2, 3, 4, 5], 3)
[1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5]

Repeats references to sequence elements; does not copy sequence elements.

Returns new object of sequence type.