/**
 * Write a function that takes in a list of actors/actresses and returns a sublist of names,
 * starting from the given index and including the next 'numActors' in the list.
 * The function should also increment the value of index by 'numActors'.
 *
 * @param actorList The list of actors/actresses.
 * @param index The starting index to access the elements.
 * @param numActors The number of actors/actresses to include in the sublist.
 * @return A sublist containing the names of selected actors/actresses.
 *
 * Example:
 * If actorList = listOf("Johnny Depp", "Meryl Streep", "Leonardo DiCaprio", "Natalie Portman", "Brad Pitt"),
 * index = 1, numActors = 3,
 * the function should return ["Meryl Streep", "Leonardo DiCaprio", "Natalie Portman"] and update index to 4.
 */
fun getActorNames(actorList: List<String>, index: Int, numActors: Int): List<String> {

    val selectedActors = actorList.subList(index, index + numActors)
    return selectedActors
}
/**
 * Write a function that takes in a list of actors/actresses and returns a sublist of names,
 * starting from the given index and including the next 'numActors' in the list.
 * The function should also increment the value of index by 'numActors'.
 *
 * @param actorList The list of actors/actresses.
 * @param index The starting index to access the elements.
 * @param numActors The number of actors/actresses to include in the sublist.
 * @return A sublist containing the names of selected actors/actresses.
 *
 * Example:
 * If actorList = listOf("Johnny Depp", "Meryl Streep", "Leonardo DiCaprio", "Natalie Portman", "Brad Pitt"),
 * index = 1, numActors = 3,
 * the function should return ["Meryl Streep", "Leonardo DiCaprio", "Natalie Portman"] and update index to 4.
 */
fun getActorNames(actorList: List<String>, index: Int, numActors: Int): List<String> {
/**
 * Write a function that takes in a list of actors/actresses and returns a sublist of names,
 * starting from the given index and including the next 'numActors' in the list.
 * The function should also increment the value of index by 'numActors'.
 *
 * @param actorList The list of actors/actresses.
 * @param index The starting index to access the elements.
 * @param numActors The number of actors/actresses to include in the sublist.
 * @return A sublist containing the names of selected actors/actresses.
 *
 * Example:
 * If actorList = listOf("Johnny Depp", "Meryl Streep", "Leonardo DiCaprio", "Natalie Portman", "Brad Pitt"),
 * index = 1, numActors = 3,
 * the function should return ["Meryl Streep", "Leonardo DiCaprio", "Natalie Portman"] and update index to 4.
 */
fun getActorNames(actorList: List<String>, index: Int, numActors: Int): List<String> {

    val selectedActors = actorList.subList(index, index + numActors)
    return selectedActors
}