/**
 * This function takes two lists as input and returns a new list containing
 * the elements that are common in both lists using a for loop.
 */
fun getCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {

    // Define an empty list to store the common elements
    val commonElements = mutableListOf<Any>()

    // Iterate through each element in the first list
    for (element in list1) {
        // Check if the element is also present in the second list
        if (element in list2) {
            // Append the element to the commonElements list
            commonElements.add(element)
        }
    }

    // Return the commonElements list
    return commonElements
}
/**
 * This function takes two lists as input and returns a new list containing
 * the elements that are common in both lists using a for loop.
 */
fun getCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {
/**
 * This function takes two lists as input and returns a new list containing
 * the elements that are common in both lists using a for loop.
 */
fun getCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {

    // Define an empty list to store the common elements
    val commonElements = mutableListOf<Any>()

    // Iterate through each element in the first list
    for (element in list1) {
        // Check if the element is also present in the second list
        if (element in list2) {
            // Append the element to the commonElements list
            commonElements.add(element)
        }
    }

    // Return the commonElements list
    return commonElements
}