/**
 * Exercise:
 * A Police Officer needs to add a new criminal to the blacklist. The blacklist is a tuple containing the names of known criminals.
 * Implement a function called add_to_blacklist that receives two parameters:
 * 1. The existing blacklist (a tuple)
 * 2. The name of the new criminal (a string)
 * The function should create a new tuple by appending the new criminal to the blacklist and return the updated blacklist.
 *
 * Example:
 * val blacklist = listOf("John Smith", "Alice Johnson", "Michael Davis")
 * val newCriminal = "David White"
 * val updatedBlacklist = add_to_blacklist(blacklist, newCriminal)
 * println(updatedBlacklist) => ["John Smith", "Alice Johnson", "Michael Davis", "David White"]
 */
fun addToBlacklist(blacklist: List<String>, newCriminal: String): List<String> {

    // Create a new list with the existing blacklist and the new criminal
    val updatedBlacklist = blacklist.toMutableList().apply { add(newCriminal) }
    return updatedBlacklist
}
/**
 * Exercise:
 * A Police Officer needs to add a new criminal to the blacklist. The blacklist is a tuple containing the names of known criminals.
 * Implement a function called add_to_blacklist that receives two parameters:
 * 1. The existing blacklist (a tuple)
 * 2. The name of the new criminal (a string)
 * The function should create a new tuple by appending the new criminal to the blacklist and return the updated blacklist.
 *
 * Example:
 * val blacklist = listOf("John Smith", "Alice Johnson", "Michael Davis")
 * val newCriminal = "David White"
 * val updatedBlacklist = add_to_blacklist(blacklist, newCriminal)
 * println(updatedBlacklist) => ["John Smith", "Alice Johnson", "Michael Davis", "David White"]
 */
fun addToBlacklist(blacklist: List<String>, newCriminal: String): List<String> {
/**
 * Exercise:
 * A Police Officer needs to add a new criminal to the blacklist. The blacklist is a tuple containing the names of known criminals.
 * Implement a function called add_to_blacklist that receives two parameters:
 * 1. The existing blacklist (a tuple)
 * 2. The name of the new criminal (a string)
 * The function should create a new tuple by appending the new criminal to the blacklist and return the updated blacklist.
 *
 * Example:
 * val blacklist = listOf("John Smith", "Alice Johnson", "Michael Davis")
 * val newCriminal = "David White"
 * val updatedBlacklist = add_to_blacklist(blacklist, newCriminal)
 * println(updatedBlacklist) => ["John Smith", "Alice Johnson", "Michael Davis", "David White"]
 */
fun addToBlacklist(blacklist: List<String>, newCriminal: String): List<String> {

    // Create a new list with the existing blacklist and the new criminal
    val updatedBlacklist = blacklist.toMutableList().apply { add(newCriminal) }
    return updatedBlacklist
}