/**
 * In this exercise, you need to write a function that takes two tuples as arguments and finds the common elements
 * present in both tuples. The function should return a new tuple containing only the common elements.
 *
 * @param tup1 A tuple containing elements. (e.g. (1, 2, 3, 4))
 * @param tup2 Another tuple containing elements. (e.g. (3, 4, 5, 6))
 * @return A new tuple containing the common elements of both input tuples. (e.g. (3, 4))
 */
fun findCommonElements(tup1: List<Any>, tup2: List<Any>): List<Any> {

    return tup2.filter { x -> x in tup1 }
}
/**
 * In this exercise, you need to write a function that takes two tuples as arguments and finds the common elements
 * present in both tuples. The function should return a new tuple containing only the common elements.
 *
 * @param tup1 A tuple containing elements. (e.g. (1, 2, 3, 4))
 * @param tup2 Another tuple containing elements. (e.g. (3, 4, 5, 6))
 * @return A new tuple containing the common elements of both input tuples. (e.g. (3, 4))
 */
fun findCommonElements(tup1: List<Any>, tup2: List<Any>): List<Any> {
/**
 * In this exercise, you need to write a function that takes two tuples as arguments and finds the common elements
 * present in both tuples. The function should return a new tuple containing only the common elements.
 *
 * @param tup1 A tuple containing elements. (e.g. (1, 2, 3, 4))
 * @param tup2 Another tuple containing elements. (e.g. (3, 4, 5, 6))
 * @return A new tuple containing the common elements of both input tuples. (e.g. (3, 4))
 */
fun findCommonElements(tup1: List<Any>, tup2: List<Any>): List<Any> {

    return tup2.filter { x -> x in tup1 }
}