def extract_by_index(a_list, indices):
    """
    Creates a list that consists of the elements at the given indices of
    the given list.

    :param a_list:      The list to get elements from.
    :param indices:     The indices to use to source elements.
    :return:            The selected list.
    """

    return [a_list[i] for i in indices]