/**
 * A biologist is studying two lists of elements and wants to find the common elements between them.
 * Complete the code to return a new list containing the elements that exist in both lists.
 *
 * @param list1 A list of elements
 * @param list2 Another list of elements
 * @return A new list containing the common elements between list1 and list2
 */
fun findCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {

    val commonElements = mutableListOf<Any>()
    for (element1 in list1) {
        for (element2 in list2) {
            if (element1 == element2) {  // Check if elements are equal
                commonElements.add(element1)  // Add common element to the list
                break  // Break inner loop and move on to next element in list1
            }
        }
    }
    return commonElements
}
/**
 * A biologist is studying two lists of elements and wants to find the common elements between them.
 * Complete the code to return a new list containing the elements that exist in both lists.
 *
 * @param list1 A list of elements
 * @param list2 Another list of elements
 * @return A new list containing the common elements between list1 and list2
 */
fun findCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {
/**
 * A biologist is studying two lists of elements and wants to find the common elements between them.
 * Complete the code to return a new list containing the elements that exist in both lists.
 *
 * @param list1 A list of elements
 * @param list2 Another list of elements
 * @return A new list containing the common elements between list1 and list2
 */
fun findCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {

    val commonElements = mutableListOf<Any>()
    for (element1 in list1) {
        for (element2 in list2) {
            if (element1 == element2) {  // Check if elements are equal
                commonElements.add(element1)  // Add common element to the list
                break  // Break inner loop and move on to next element in list1
            }
        }
    }
    return commonElements
}