/**
 * Given two lists, membershipList and exampleList,
 * return a list of common elements present in both lists.
 *
 * @param membershipList List of membership elements.
 * @param exampleList List of example elements.
 * @return List of common elements in membershipList and exampleList.
 */
fun findCommonMembers(membershipList: List<Any>, exampleList: List<Any>): List<Any> {

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

    // Iterate over each element in the membershipList
    for (element in membershipList) {
        // Check if the element is also present in the exampleList
        if (element in exampleList) {
            // If the element is common, add it to the commonElements list
            commonElements.add(element)
        }
    }

    // Return the list of common elements
    return commonElements
}
/**
 * Given two lists, membershipList and exampleList,
 * return a list of common elements present in both lists.
 *
 * @param membershipList List of membership elements.
 * @param exampleList List of example elements.
 * @return List of common elements in membershipList and exampleList.
 */
fun findCommonMembers(membershipList: List<Any>, exampleList: List<Any>): List<Any> {
/**
 * Given two lists, membershipList and exampleList,
 * return a list of common elements present in both lists.
 *
 * @param membershipList List of membership elements.
 * @param exampleList List of example elements.
 * @return List of common elements in membershipList and exampleList.
 */
fun findCommonMembers(membershipList: List<Any>, exampleList: List<Any>): List<Any> {

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

    // Iterate over each element in the membershipList
    for (element in membershipList) {
        // Check if the element is also present in the exampleList
        if (element in exampleList) {
            // If the element is common, add it to the commonElements list
            commonElements.add(element)
        }
    }

    // Return the list of common elements
    return commonElements
}