/**
 * A zoologist needs to find the common elements between two lists: list1 and list2.
 * The zoologist has started writing a function, but incomplete. Help the zoologist
 * complete the function by writing the missing code.
 *
 * @param list1 A list of elements.
 * @param list2 Another list of elements.
 * @return A list containing the common elements between the input lists.
 */
fun findCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {

    val commonElements = mutableListOf<Any>()

    // Combine the for loop with the necessary operations to find common elements
    for (element in list1) {
        if (element in list2) {
            commonElements.add(element)
        }
    }

    return commonElements
}
/**
 * A zoologist needs to find the common elements between two lists: list1 and list2.
 * The zoologist has started writing a function, but incomplete. Help the zoologist
 * complete the function by writing the missing code.
 *
 * @param list1 A list of elements.
 * @param list2 Another list of elements.
 * @return A list containing the common elements between the input lists.
 */
fun findCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {
/**
 * A zoologist needs to find the common elements between two lists: list1 and list2.
 * The zoologist has started writing a function, but incomplete. Help the zoologist
 * complete the function by writing the missing code.
 *
 * @param list1 A list of elements.
 * @param list2 Another list of elements.
 * @return A list containing the common elements between the input lists.
 */
fun findCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {

    val commonElements = mutableListOf<Any>()

    // Combine the for loop with the necessary operations to find common elements
    for (element in list1) {
        if (element in list2) {
            commonElements.add(element)
        }
    }

    return commonElements
}