/**
 * This function takes two lists as input and returns a new list containing the common elements
 * found in both lists. The code uses a loop to iterate over one of the lists and the 'not in'
 * operator to check if each element in the first list is not present in the second list. If an
 * element is not found, it is appended to the 'commonElements' list. Finally, the function
 * returns the 'commonElements' list.
 */
fun findCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {

    val commonElements = mutableListOf<Any>()

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

    return commonElements
}
/**
 * This function takes two lists as input and returns a new list containing the common elements
 * found in both lists. The code uses a loop to iterate over one of the lists and the 'not in'
 * operator to check if each element in the first list is not present in the second list. If an
 * element is not found, it is appended to the 'commonElements' list. Finally, the function
 * returns the 'commonElements' list.
 */
fun findCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {
/**
 * This function takes two lists as input and returns a new list containing the common elements
 * found in both lists. The code uses a loop to iterate over one of the lists and the 'not in'
 * operator to check if each element in the first list is not present in the second list. If an
 * element is not found, it is appended to the 'commonElements' list. Finally, the function
 * returns the 'commonElements' list.
 */
fun findCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {

    val commonElements = mutableListOf<Any>()

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

    return commonElements
}