def exclude_indices(excluded_indices, list):
    """Remove the elements at the given indices from the list, and return
    it."""
    vacuum = 0
    for i in excluded_indices:
        del list[i - vacuum]
        vacuum += 1
    return list
