flatten
Return a list which is a single level of flattening of the original list.
def flatten(
fields: Iterable
) - > list
Return a list which is a single level of flattening of the original list.
Parameters
| Name | Type | Description |
|---|---|---|
| fields | Iterable | A collection of items or nested sequences (lists/tuples) to be flattened by one level |
Returns
| Type | Description |
|---|---|
list | A new list containing the elements of the input, where any immediate sub-lists or tuples have been unpacked into the top-level sequence |