/**
 * This function takes two lists as input and returns a new list containing the elements
 * that are present in one list but not in the other list.
 *
 * @param list1 A list of elements.
 * @param list2 A list of elements.
 * @return A list containing the elements present in one list but not in the other.
 */
fun findNonMatchingElements(list1: List<Any>, list2: List<Any>): List<Any> {

    val nonMatchingElements = mutableListOf<Any>()

    for (element in list1) {
        if (element !in list2) {
            nonMatchingElements.add(element)
        }
    }

    for (element in list2) {
        if (element !in list1 && element !in nonMatchingElements) {
            nonMatchingElements.add(element)
        }
    }

    return nonMatchingElements
}
/**
 * This function takes two lists as input and returns a new list containing the elements
 * that are present in one list but not in the other list.
 *
 * @param list1 A list of elements.
 * @param list2 A list of elements.
 * @return A list containing the elements present in one list but not in the other.
 */
fun findNonMatchingElements(list1: List<Any>, list2: List<Any>): List<Any> {
/**
 * This function takes two lists as input and returns a new list containing the elements
 * that are present in one list but not in the other list.
 *
 * @param list1 A list of elements.
 * @param list2 A list of elements.
 * @return A list containing the elements present in one list but not in the other.
 */
fun findNonMatchingElements(list1: List<Any>, list2: List<Any>): List<Any> {

    val nonMatchingElements = mutableListOf<Any>()

    for (element in list1) {
        if (element !in list2) {
            nonMatchingElements.add(element)
        }
    }

    for (element in list2) {
        if (element !in list1 && element !in nonMatchingElements) {
            nonMatchingElements.add(element)
        }
    }

    return nonMatchingElements
}