0 out of 464 challenges solved

Array Intersection

Write a function `intersection_array` that takes two lists of integers as input and returns a list containing the intersection of the two lists. The intersection of two lists is defined as the set of elements that are present in both lists.

#### Example Usage
```python [main.nopy]
intersection_array([1, 2, 3, 5, 7, 8, 9, 10], [1, 2, 4, 8, 9])
# Output: [1, 2, 8, 9]

intersection_array([1, 2, 3, 5, 7, 8, 9, 10], [3, 5, 7, 9])
# Output: [3, 5, 7, 9]

intersection_array([1, 2, 3, 5, 7, 8, 9, 10], [10, 20, 30, 40])
# Output: [10]
```
def intersection_array(array_nums1, array_nums2):
    """
    Find the intersection of two arrays.

    Args:
        array_nums1 (list): The first list of integers.
        array_nums2 (list): The second list of integers.

    Returns:
        list: A list containing the intersection of the two input lists.
    """
    # Your code here
    pass