/**
 * Given a tuple 't' and an index 'index', delete the element at the specified index
 * and return a new tuple with the remaining elements sliced.
 *
 * @param t The input tuple
 * @param index The index of the element to delete
 * @return A new tuple with the remaining elements sliced
 *
 * Example:
 * deleteAndSliceTuple(listOf('A', 'B', 'C', 'D', 'E'), 2) -> listOf('A', 'B', 'D', 'E')
 */
fun deleteAndSliceTuple(t: List<Char>, index: Int): List<Char> {

    // Delete the element at the specified index using slicing
    val newTuple = t.toMutableList()
    newTuple.removeAt(index)

    // Return the new tuple with the remaining elements sliced
    return newTuple
}
/**
 * Given a tuple 't' and an index 'index', delete the element at the specified index
 * and return a new tuple with the remaining elements sliced.
 *
 * @param t The input tuple
 * @param index The index of the element to delete
 * @return A new tuple with the remaining elements sliced
 *
 * Example:
 * deleteAndSliceTuple(listOf('A', 'B', 'C', 'D', 'E'), 2) -> listOf('A', 'B', 'D', 'E')
 */
fun deleteAndSliceTuple(t: List<Char>, index: Int): List<Char> {
/**
 * Given a tuple 't' and an index 'index', delete the element at the specified index
 * and return a new tuple with the remaining elements sliced.
 *
 * @param t The input tuple
 * @param index The index of the element to delete
 * @return A new tuple with the remaining elements sliced
 *
 * Example:
 * deleteAndSliceTuple(listOf('A', 'B', 'C', 'D', 'E'), 2) -> listOf('A', 'B', 'D', 'E')
 */
fun deleteAndSliceTuple(t: List<Char>, index: Int): List<Char> {

    // Delete the element at the specified index using slicing
    val newTuple = t.toMutableList()
    newTuple.removeAt(index)

    // Return the new tuple with the remaining elements sliced
    return newTuple
}