In the first graded assignment there is a function:
def query_news(indices):
"""
Retrieves elements from a dataset based on specified indices.
Parameters:
indices (list of int): A list containing the indices of the desired elements in the dataset.
dataset (list or sequence): The dataset from which elements are to be retrieved. It should support indexing.
Returns:
list: A list of elements from the dataset corresponding to the indices provided in list_of_indices.
"""
output = [NEWS_DATA[index] for index in indices]
return output
But there is no dataset parameter