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

    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) {
            // Append the common element to the commonElements list
            commonElements.add(element)
        }
    }
    
    // Return the list containing common elements
    return commonElements
}
/**
 * This function takes two lists as inputs and returns a new list containing the common elements between them.
 *
 * @param list1 A list of elements
 * @param list2 A list of elements
 * @return A new list containing common elements between list1 and list2
 */
fun findCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {
/**
 * This function takes two lists as inputs and returns a new list containing the common elements between them.
 *
 * @param list1 A list of elements
 * @param list2 A list of elements
 * @return A new list containing common elements between list1 and list2
 */
fun findCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {

    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) {
            // Append the common element to the commonElements list
            commonElements.add(element)
        }
    }
    
    // Return the list containing common elements
    return commonElements
}