/**
 * This exercise requires modifying elements of a list and creating a tuple.
 *
 * You need to complete the code by modifying a specific index of a list by the given value
 * and then creating a tuple of the modified list.
 *
 * @param lst The input list.
 * @param index The index position to be modified in the list.
 * @param value The value to be substituted at the given index.
 * @return The modified list as a tuple.
 *
 * Example:
 * modifyTupleList(listOf(1, 2, 3, 4, 5), 2, "modified") // Output: (1, 2, "modified", 4, 5)
 */
fun modifyTupleList(lst: MutableList<Any>, index: Int, value: Any): List<Any> {

    lst[index] = value  // Modify the specific index in the list
    return lst.toList()  // Create a tuple from the modified list
}
/**
 * This exercise requires modifying elements of a list and creating a tuple.
 *
 * You need to complete the code by modifying a specific index of a list by the given value
 * and then creating a tuple of the modified list.
 *
 * @param lst The input list.
 * @param index The index position to be modified in the list.
 * @param value The value to be substituted at the given index.
 * @return The modified list as a tuple.
 *
 * Example:
 * modifyTupleList(listOf(1, 2, 3, 4, 5), 2, "modified") // Output: (1, 2, "modified", 4, 5)
 */
fun modifyTupleList(lst: MutableList<Any>, index: Int, value: Any): List<Any> {
/**
 * This exercise requires modifying elements of a list and creating a tuple.
 *
 * You need to complete the code by modifying a specific index of a list by the given value
 * and then creating a tuple of the modified list.
 *
 * @param lst The input list.
 * @param index The index position to be modified in the list.
 * @param value The value to be substituted at the given index.
 * @return The modified list as a tuple.
 *
 * Example:
 * modifyTupleList(listOf(1, 2, 3, 4, 5), 2, "modified") // Output: (1, 2, "modified", 4, 5)
 */
fun modifyTupleList(lst: MutableList<Any>, index: Int, value: Any): List<Any> {

    lst[index] = value  // Modify the specific index in the list
    return lst.toList()  // Create a tuple from the modified list
}