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

    val commonElements = mutableListOf<Any>()

    // Iterate over the elements in the first list
    for (element in list1) {
        // Check if the element is also present in the second list
        if (element in list2) {
            // Add the element to the common elements list
            commonElements.add(element)
        }
    }

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

    val commonElements = mutableListOf<Any>()

    // Iterate over the elements in the first list
    for (element in list1) {
        // Check if the element is also present in the second list
        if (element in list2) {
            // Add the element to the common elements list
            commonElements.add(element)
        }
    }

    return commonElements
}