/**
 * This function finds the intersection of two given lists using the 'in' operator.
 *
 * @param aList The first list.
 * @param bList The second list.
 * @return The intersection of the two lists.
 *
 * Example:
 * intersectionWithInOperator(listOf(1, 2, 3, 4, 5), listOf(4, 5, 6, 7, 8)) // [4, 5]
 * intersectionWithInOperator(listOf("apple", "banana", "orange"), listOf("banana", "grape", "kiwi")) // ["banana"]
 */
fun intersectionWithInOperator(aList: List<Any>, bList: List<Any>): List<Any> {

    val intersection = mutableListOf<Any>()
    
    for (element in aList) {
        if (element in bList) {
            intersection.add(element)
        }
    }
    
    return intersection
}
/**
 * This function finds the intersection of two given lists using the 'in' operator.
 *
 * @param aList The first list.
 * @param bList The second list.
 * @return The intersection of the two lists.
 *
 * Example:
 * intersectionWithInOperator(listOf(1, 2, 3, 4, 5), listOf(4, 5, 6, 7, 8)) // [4, 5]
 * intersectionWithInOperator(listOf("apple", "banana", "orange"), listOf("banana", "grape", "kiwi")) // ["banana"]
 */
fun intersectionWithInOperator(aList: List<Any>, bList: List<Any>): List<Any> {
/**
 * This function finds the intersection of two given lists using the 'in' operator.
 *
 * @param aList The first list.
 * @param bList The second list.
 * @return The intersection of the two lists.
 *
 * Example:
 * intersectionWithInOperator(listOf(1, 2, 3, 4, 5), listOf(4, 5, 6, 7, 8)) // [4, 5]
 * intersectionWithInOperator(listOf("apple", "banana", "orange"), listOf("banana", "grape", "kiwi")) // ["banana"]
 */
fun intersectionWithInOperator(aList: List<Any>, bList: List<Any>): List<Any> {

    val intersection = mutableListOf<Any>()
    
    for (element in aList) {
        if (element in bList) {
            intersection.add(element)
        }
    }
    
    return intersection
}