/**
 * This exercise requires you to modify elements in a list and create a tuple using the tuple() function.
 *
 * You are given a list of items and a list of indices. Your task is to modify the elements at the given indices
 * in the item list by doubling their values and then creating a tuple using the modified item list.
 *
 * @param itemList A list of items.
 * @param indexList A list of indices where the elements in itemList should be modified.
 * @return A tuple containing the modified elements from the itemList.
 */
fun modifyListAndCreateTuple(itemList: MutableList<Int>, indexList: List<Int>): List<Int> {

    // Iterate over the given indices
    for (index in indexList) {
        // Double the value of the element at the given index
        itemList[index] *= 2
    }

    // Create a tuple using the modified itemList
    return itemList.toList()
}
/**
 * This exercise requires you to modify elements in a list and create a tuple using the tuple() function.
 *
 * You are given a list of items and a list of indices. Your task is to modify the elements at the given indices
 * in the item list by doubling their values and then creating a tuple using the modified item list.
 *
 * @param itemList A list of items.
 * @param indexList A list of indices where the elements in itemList should be modified.
 * @return A tuple containing the modified elements from the itemList.
 */
fun modifyListAndCreateTuple(itemList: MutableList<Int>, indexList: List<Int>): List<Int> {
/**
 * This exercise requires you to modify elements in a list and create a tuple using the tuple() function.
 *
 * You are given a list of items and a list of indices. Your task is to modify the elements at the given indices
 * in the item list by doubling their values and then creating a tuple using the modified item list.
 *
 * @param itemList A list of items.
 * @param indexList A list of indices where the elements in itemList should be modified.
 * @return A tuple containing the modified elements from the itemList.
 */
fun modifyListAndCreateTuple(itemList: MutableList<Int>, indexList: List<Int>): List<Int> {

    // Iterate over the given indices
    for (index in indexList) {
        // Double the value of the element at the given index
        itemList[index] *= 2
    }

    // Create a tuple using the modified itemList
    return itemList.toList()
}