/**
 * This function takes in two lists and returns a list of common elements between them.
 *
 * @param list1 The first list.
 * @param list2 The second list.
 * @return A list of common elements between list1 and list2.
 */
fun commonElements(list1: List<Any>, list2: List<Any>): List<Any> {

    // Initialize an empty list to store common elements
    val commonList = mutableListOf<Any>()

    // Loop through each element in list1
    for (element in list1) {
        // Check if the element is present in list2
        if (element in list2) {
            // Add the common element to the commonList
            commonList.add(element)
        }
    }

    // Return the commonList
    return commonList
}
/**
 * This function takes in two lists and returns a list of common elements between them.
 *
 * @param list1 The first list.
 * @param list2 The second list.
 * @return A list of common elements between list1 and list2.
 */
fun commonElements(list1: List<Any>, list2: List<Any>): List<Any> {
/**
 * This function takes in two lists and returns a list of common elements between them.
 *
 * @param list1 The first list.
 * @param list2 The second list.
 * @return A list of common elements between list1 and list2.
 */
fun commonElements(list1: List<Any>, list2: List<Any>): List<Any> {

    // Initialize an empty list to store common elements
    val commonList = mutableListOf<Any>()

    // Loop through each element in list1
    for (element in list1) {
        // Check if the element is present in list2
        if (element in list2) {
            // Add the common element to the commonList
            commonList.add(element)
        }
    }

    // Return the commonList
    return commonList
}