remove_repeated_elements

sequencetools.remove_repeated_elements(sequence)

Removes repeated elements from sequence.

Example 1. Removes repeated elements from tuple:

>>> sequence = (17, 18, 18, 18, 19, 20, 21, 22, 22, 24, 24)
>>> sequencetools.remove_repeated_elements(sequence)
(17, 18, 19, 20, 21, 22, 24)

Example 2. Removes repeated elementsfrom list:

>>> sequence = [31, 31, 35, 35, 31, 31, 31, 31, 35]
>>> sequencetools.remove_repeated_elements(sequence)
[31, 35, 31, 35]

Returns new object of sequence type.