/**
 * Given a list of actor names and an index, modify the name at the specified index with a new name.
 * Return the modified list.
 *
 * @param actorList A list of actor names.
 * @param index The index of the name to be modified.
 * @param newName The new name to replace the existing name at the specified index.
 * @return The modified list of actor names.
 */
fun modifyName(actorList: MutableList<String>, index: Int, newName: String): List<String> {

    // Access the name at the specified index in the actorList and replace it with the newName
    actorList[index] = newName
    return actorList
}
/**
 * Given a list of actor names and an index, modify the name at the specified index with a new name.
 * Return the modified list.
 *
 * @param actorList A list of actor names.
 * @param index The index of the name to be modified.
 * @param newName The new name to replace the existing name at the specified index.
 * @return The modified list of actor names.
 */
fun modifyName(actorList: MutableList<String>, index: Int, newName: String): List<String> {
/**
 * Given a list of actor names and an index, modify the name at the specified index with a new name.
 * Return the modified list.
 *
 * @param actorList A list of actor names.
 * @param index The index of the name to be modified.
 * @param newName The new name to replace the existing name at the specified index.
 * @return The modified list of actor names.
 */
fun modifyName(actorList: MutableList<String>, index: Int, newName: String): List<String> {

    // Access the name at the specified index in the actorList and replace it with the newName
    actorList[index] = newName
    return actorList
}