def take(items, indices):
return (items[index] for index in indices)<EOL>
Selects a subset of a list based on a list of indices.
This is similar to np.take, but pure python.

Args:
    items (Sequence): an indexable object to select items from

    indices (Iterable): sequence of indexing objects

Returns:
    Iterable or scalar: subset of the list

SeeAlso:
    ub.dict_subset

Example:
    >>> import ubelt as ub
    >>> items = [0, 1, 2, 3]
    >>> indices = [2, 0]
    >>> list(ub.take(items, indices))
    [2, 0]