/**
 * Modifies the rank of a police officer and creates a tuple with their updated information.
 *
 * @param officerInfo A list containing the officer's current information in the format [name, rank, badgeNumber].
 * @param newRank The desired new rank for the officer.
 * @return A tuple containing the officer's updated information in the format (name, rank, badgeNumber).
 */
fun modifyElementAndCreateTuple(officerInfo: MutableList<String>, newRank: String): Triple<String, String, String> {

    // Modify the officer's rank
    officerInfo[1] = newRank

    // Create a tuple with the updated officer information
    return Triple(officerInfo[0], officerInfo[1], officerInfo[2])
}
/**
 * Modifies the rank of a police officer and creates a tuple with their updated information.
 *
 * @param officerInfo A list containing the officer's current information in the format [name, rank, badgeNumber].
 * @param newRank The desired new rank for the officer.
 * @return A tuple containing the officer's updated information in the format (name, rank, badgeNumber).
 */
fun modifyElementAndCreateTuple(officerInfo: MutableList<String>, newRank: String): Triple<String, String, String> {
/**
 * Modifies the rank of a police officer and creates a tuple with their updated information.
 *
 * @param officerInfo A list containing the officer's current information in the format [name, rank, badgeNumber].
 * @param newRank The desired new rank for the officer.
 * @return A tuple containing the officer's updated information in the format (name, rank, badgeNumber).
 */
fun modifyElementAndCreateTuple(officerInfo: MutableList<String>, newRank: String): Triple<String, String, String> {

    // Modify the officer's rank
    officerInfo[1] = newRank

    // Create a tuple with the updated officer information
    return Triple(officerInfo[0], officerInfo[1], officerInfo[2])
}