/**
 * This function takes in two lists and returns a new list containing the common elements between them.
 *
 * @param list1 the first list
 * @param list2 the second list
 * @return a list containing the common elements between list1 and list2
 */
fun findCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {

    // Initialize an empty list to store the common elements
    val commonElements = mutableListOf<Any>()

    // Iterate over each element in list1
    for (element in list1) {
        // Check if the element is present in list2
        if (element in list2) {
            // Check if the element is already in the commonElements list
            if (element !in commonElements) {
                // Append the element to the commonElements list
                commonElements.add(element)
            }
        }
    }

    // Return the commonElements list
    return commonElements
}
/**
 * This function takes in two lists and returns a new list containing the common elements between them.
 *
 * @param list1 the first list
 * @param list2 the second list
 * @return a list containing the common elements between list1 and list2
 */
fun findCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {
/**
 * This function takes in two lists and returns a new list containing the common elements between them.
 *
 * @param list1 the first list
 * @param list2 the second list
 * @return a list containing the common elements between list1 and list2
 */
fun findCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {

    // Initialize an empty list to store the common elements
    val commonElements = mutableListOf<Any>()

    // Iterate over each element in list1
    for (element in list1) {
        // Check if the element is present in list2
        if (element in list2) {
            // Check if the element is already in the commonElements list
            if (element !in commonElements) {
                // Append the element to the commonElements list
                commonElements.add(element)
            }
        }
    }

    // Return the commonElements list
    return commonElements
}