/**
 * This exercise requires finding the common elements in the given two lists using list slicing and membership
 */
fun findCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {

    val commonElements = mutableListOf<Any>()

    // Iterating over each element in list1
    for (element in list1) {
        // Checking if the element exists in list2 using contains() method
        if (element in list2) {
            // Appending the common element to the commonElements list
            commonElements.add(element)
        }
    }

    return commonElements
}
/**
 * This exercise requires finding the common elements in the given two lists using list slicing and membership
 */
fun findCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {
/**
 * This exercise requires finding the common elements in the given two lists using list slicing and membership
 */
fun findCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {

    val commonElements = mutableListOf<Any>()

    // Iterating over each element in list1
    for (element in list1) {
        // Checking if the element exists in list2 using contains() method
        if (element in list2) {
            // Appending the common element to the commonElements list
            commonElements.add(element)
        }
    }

    return commonElements
}