/**
 * A function to find the common items between two lists.
 *
 * @param list1 The first list.
 * @param list2 The second list.
 * @return A list containing the common items between list1 and list2.
 */
fun findCommonItems(list1: List<Any>, list2: List<Any>): List<Any> {

    val commonItems = mutableListOf<Any>()

    // Iterate over the first list
    for (item in list1) {
        // Check if the item in list1 is present in list2
        if (list2.contains(item)) {
            // Check if the item is already present in the commonItems list
            if (item !in commonItems) {
                // Add the item to the commonItems list
                commonItems.add(item)
            }
        }
    }

    return commonItems
}
/**
 * A function to find the common items between two lists.
 *
 * @param list1 The first list.
 * @param list2 The second list.
 * @return A list containing the common items between list1 and list2.
 */
fun findCommonItems(list1: List<Any>, list2: List<Any>): List<Any> {
/**
 * A function to find the common items between two lists.
 *
 * @param list1 The first list.
 * @param list2 The second list.
 * @return A list containing the common items between list1 and list2.
 */
fun findCommonItems(list1: List<Any>, list2: List<Any>): List<Any> {

    val commonItems = mutableListOf<Any>()

    // Iterate over the first list
    for (item in list1) {
        // Check if the item in list1 is present in list2
        if (list2.contains(item)) {
            // Check if the item is already present in the commonItems list
            if (item !in commonItems) {
                // Add the item to the commonItems list
                commonItems.add(item)
            }
        }
    }

    return commonItems
}