/**
 * This function removes unwanted animals from the list of animals.
 *
 * @param animals The list of animals.
 * @param unwantedAnimals The list of unwanted animals.
 * @return The updated list of animals without the unwanted animals.
 */
fun removeUnwantedElements(animals: MutableList<String>, unwantedAnimals: List<String>): MutableList<String> {

    // Iterate over the unwanted animals
    for (animal in unwantedAnimals) {
        // Check if the animal is present in the list of animals
        if (animals.contains(animal)) {
            animals.remove(animal) // Remove the unwanted animal
        }
    }
    return animals
}
/**
 * This function removes unwanted animals from the list of animals.
 *
 * @param animals The list of animals.
 * @param unwantedAnimals The list of unwanted animals.
 * @return The updated list of animals without the unwanted animals.
 */
fun removeUnwantedElements(animals: MutableList<String>, unwantedAnimals: List<String>): MutableList<String> {
/**
 * This function removes unwanted animals from the list of animals.
 *
 * @param animals The list of animals.
 * @param unwantedAnimals The list of unwanted animals.
 * @return The updated list of animals without the unwanted animals.
 */
fun removeUnwantedElements(animals: MutableList<String>, unwantedAnimals: List<String>): MutableList<String> {

    // Iterate over the unwanted animals
    for (animal in unwantedAnimals) {
        // Check if the animal is present in the list of animals
        if (animals.contains(animal)) {
            animals.remove(animal) // Remove the unwanted animal
        }
    }
    return animals
}