/**
 * This function takes two lists as input and returns a new list containing the elements that are common to both lists.
 *
 * @param list1 a list of elements
 * @param list2 another list of elements
 * @return intersection a list containing the elements present in both list1 and list2
 */
fun findIntersection(list1: List<Any>, list2: List<Any>): List<Any> {

    val intersection = mutableListOf<Any>()
    for (element in list1) {
        if (element in list2) {
            intersection.add(element)
        }
    }
    return intersection
}
/**
 * This function takes two lists as input and returns a new list containing the elements that are common to both lists.
 *
 * @param list1 a list of elements
 * @param list2 another list of elements
 * @return intersection a list containing the elements present in both list1 and list2
 */
fun findIntersection(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 common to both lists.
 *
 * @param list1 a list of elements
 * @param list2 another list of elements
 * @return intersection a list containing the elements present in both list1 and list2
 */
fun findIntersection(list1: List<Any>, list2: List<Any>): List<Any> {

    val intersection = mutableListOf<Any>()
    for (element in list1) {
        if (element in list2) {
            intersection.add(element)
        }
    }
    return intersection
}