While most of these functions look (and work) like set operations, their result differs from using Python builtin Sets in that they preserve the order of the items in the lists.
a,n=1) |
a,b) |
a,b) |
a,b) |
a,b) |
a) |
a,recurse=False) |
By default, lists are flattened one level deep. If recurse=True, flattening recurses through all sublists.
a,b) |
Returns a list with the items of a for which the index is in b.
items,return_indices=False) |
items is a list of items of any type having the len() method. The items are put in separate lists according to their length.
The return value is a dict where the keys are item lengths and the values are lists of items with this length.
If return_indices is True, a second dict is returned, with the same keys, holding the original indices of the items in the lists.