how to print selected elements from a list code example Example: how to print selected elements from a list selected_elements = [a_list[index] for index in indices]