/**
 * This exercise focuses on appending new elements to a list and accessing the elements of a list.
 *
 * Given an economist's list and a list of new elements, the function should append the new elements to the economist's list
 * and output the element at index 3 of the resulting list.
 *
 * @param economistList A list containing information about the economists.
 * @param newElements A list of new elements to append to the economist's list.
 * @return The element at index 3 of the resulting list after appending the new elements.
 */
fun appendAndAccessElements(economistList: MutableList<Any>, newElements: List<Any>): Any {

    economistList.addAll(newElements)

    // Access the element at index 3 of the resulting list
    val elementAtIndex3 = economistList[3]

    return elementAtIndex3
}
/**
 * This exercise focuses on appending new elements to a list and accessing the elements of a list.
 *
 * Given an economist's list and a list of new elements, the function should append the new elements to the economist's list
 * and output the element at index 3 of the resulting list.
 *
 * @param economistList A list containing information about the economists.
 * @param newElements A list of new elements to append to the economist's list.
 * @return The element at index 3 of the resulting list after appending the new elements.
 */
fun appendAndAccessElements(economistList: MutableList<Any>, newElements: List<Any>): Any {
/**
 * This exercise focuses on appending new elements to a list and accessing the elements of a list.
 *
 * Given an economist's list and a list of new elements, the function should append the new elements to the economist's list
 * and output the element at index 3 of the resulting list.
 *
 * @param economistList A list containing information about the economists.
 * @param newElements A list of new elements to append to the economist's list.
 * @return The element at index 3 of the resulting list after appending the new elements.
 */
fun appendAndAccessElements(economistList: MutableList<Any>, newElements: List<Any>): Any {

    economistList.addAll(newElements)

    // Access the element at index 3 of the resulting list
    val elementAtIndex3 = economistList[3]

    return elementAtIndex3
}