/**
 * This function creates a map with animal names as keys and their respective characteristics as values.
 * It demonstrates the use of null in assigning values to keys that have no characteristics listed.
 */
fun createAnimalData(animals: List<String>, characteristics: List<String>): Map<String, Map<String, String?>> {

    val animalData = mutableMapOf<String, MutableMap<String, String?>>()

    // Loop through each animal
    for (animal in animals) {
        animalData[animal] = mutableMapOf()

        // Loop through each characteristic for the current animal
        for (characteristic in characteristics) {
            print("Enter the $characteristic of $animal: ")
            val description = readLine() ?: ""

            // Assign the characteristic value to the animal
            animalData[animal]?.set(characteristic, if (description.isBlank()) null else description)
        }
    }

    return animalData
}
/**
 * This function creates a map with animal names as keys and their respective characteristics as values.
 * It demonstrates the use of null in assigning values to keys that have no characteristics listed.
 */
fun createAnimalData(animals: List<String>, characteristics: List<String>): Map<String, Map<String, String?>> {
/**
 * This function creates a map with animal names as keys and their respective characteristics as values.
 * It demonstrates the use of null in assigning values to keys that have no characteristics listed.
 */
fun createAnimalData(animals: List<String>, characteristics: List<String>): Map<String, Map<String, String?>> {

    val animalData = mutableMapOf<String, MutableMap<String, String?>>()

    // Loop through each animal
    for (animal in animals) {
        animalData[animal] = mutableMapOf()

        // Loop through each characteristic for the current animal
        for (characteristic in characteristics) {
            print("Enter the $characteristic of $animal: ")
            val description = readLine() ?: ""

            // Assign the characteristic value to the animal
            animalData[animal]?.set(characteristic, if (description.isBlank()) null else description)
        }
    }

    return animalData
}