hbutils.collection.structural

Overview:

Structural operations.

sq_flatten

hbutils.collection.structural.sq_flatten(s)[source]
Overview:

Sequence flatten.

Arguments:
  • s: The given sequence.

Returns:
  • flatted: Flatted sequence.

Examples::
>>> from hbutils.collection import sq_flatten
>>> sq_flatten([1, 2, [3, 4], [5, [6, 7], (8, 9, 10)], 11])
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]