/**
 * This exercise tests your understanding of the intersection of None and the 'in' statement in Python.
 * You need to write a function that takes two lists of numbers as input and returns the common elements
 * present in both lists using the 'in' statement.
 *
 * @param numbers1 A list of numbers.
 * @param numbers2 A list of numbers.
 * @return Common elements present in both lists.
 *
 * Example:
 * intersectionOfNoneAndInStatement(listOf(1, 2, 3, 4, 5), listOf(4, 5, 6, 7, 8, 9)) // [4, 5]
 */
fun intersectionOfNoneAndInStatement(numbers1: List<Int>, numbers2: List<Int>): List<Int> {

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

    // Loop through each element in numbers1
    for (num in numbers1) {
        // Check if the current number exists in numbers2
        if (num in numbers2) {
            // Append the common element to the list
            commonElements.add(num)
        }
    }

    // Return the list of common elements
    return commonElements
}
/**
 * This exercise tests your understanding of the intersection of None and the 'in' statement in Python.
 * You need to write a function that takes two lists of numbers as input and returns the common elements
 * present in both lists using the 'in' statement.
 *
 * @param numbers1 A list of numbers.
 * @param numbers2 A list of numbers.
 * @return Common elements present in both lists.
 *
 * Example:
 * intersectionOfNoneAndInStatement(listOf(1, 2, 3, 4, 5), listOf(4, 5, 6, 7, 8, 9)) // [4, 5]
 */
fun intersectionOfNoneAndInStatement(numbers1: List<Int>, numbers2: List<Int>): List<Int> {
/**
 * This exercise tests your understanding of the intersection of None and the 'in' statement in Python.
 * You need to write a function that takes two lists of numbers as input and returns the common elements
 * present in both lists using the 'in' statement.
 *
 * @param numbers1 A list of numbers.
 * @param numbers2 A list of numbers.
 * @return Common elements present in both lists.
 *
 * Example:
 * intersectionOfNoneAndInStatement(listOf(1, 2, 3, 4, 5), listOf(4, 5, 6, 7, 8, 9)) // [4, 5]
 */
fun intersectionOfNoneAndInStatement(numbers1: List<Int>, numbers2: List<Int>): List<Int> {

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

    // Loop through each element in numbers1
    for (num in numbers1) {
        // Check if the current number exists in numbers2
        if (num in numbers2) {
            // Append the common element to the list
            commonElements.add(num)
        }
    }

    // Return the list of common elements
    return commonElements
}