Removes one level of nesting from items
Parameters: | items : iterable
|
---|---|
Returns: | flattened_items : list
|
Examples
>>> from skbio.util import flatten
>>> h = [['a', 'b', 'c', 'd'], [1, 2, 3, 4, 5], ['x', 'y'], ['foo']]
>>> print(flatten(h))
['a', 'b', 'c', 'd', 1, 2, 3, 4, 5, 'x', 'y', 'foo']