/**
 * This function takes in two tuples and returns the intersection of the two tuples using the AND operator.
 *
 * @param tuples1 The first input tuple.
 * @param tuples2 The second input tuple.
 * @return The intersection of the two input tuples.
 */
fun intersectionOfTuples(tuples1: List<Any>, tuples2: List<Any>): List<Any> {

    // Initialize an empty list to store the intersection elements
    val intersectionList = mutableListOf<Any>()

    // Iterate over each element in the first tuple
    for (element1 in tuples1) {
        // Iterate over each element in the second tuple
        for (element2 in tuples2) {
            // Check if the current elements in both tuples are equal
            if (element1 == element2) {
                // Add the common element to the intersection list
                intersectionList.add(element1)
            }
        }
    }

    // Return the intersection list
    return intersectionList
}
/**
 * This function takes in two tuples and returns the intersection of the two tuples using the AND operator.
 *
 * @param tuples1 The first input tuple.
 * @param tuples2 The second input tuple.
 * @return The intersection of the two input tuples.
 */
fun intersectionOfTuples(tuples1: List<Any>, tuples2: List<Any>): List<Any> {
/**
 * This function takes in two tuples and returns the intersection of the two tuples using the AND operator.
 *
 * @param tuples1 The first input tuple.
 * @param tuples2 The second input tuple.
 * @return The intersection of the two input tuples.
 */
fun intersectionOfTuples(tuples1: List<Any>, tuples2: List<Any>): List<Any> {

    // Initialize an empty list to store the intersection elements
    val intersectionList = mutableListOf<Any>()

    // Iterate over each element in the first tuple
    for (element1 in tuples1) {
        // Iterate over each element in the second tuple
        for (element2 in tuples2) {
            // Check if the current elements in both tuples are equal
            if (element1 == element2) {
                // Add the common element to the intersection list
                intersectionList.add(element1)
            }
        }
    }

    // Return the intersection list
    return intersectionList
}