join_subsequences

sequencetools.join_subsequences(sequence)

Join subsequences in sequence.

Example 1. Joins tuples:

>>> tuples = [(1, 2, 3), (), (4, 5), (), (6,)]
>>> sequencetools.join_subsequences(tuples)
(1, 2, 3, 4, 5, 6)

Example 2. Joins lists:

>>> lists = [[1, 2, 3], [], [4, 5], [], [6]]
>>> sequencetools.join_subsequences(lists)
[1, 2, 3, 4, 5, 6]

Returns new object of sequence type.