def merge(arrA, arrB):
    """Merge two sorted arrays.

    :param arrA (list): First/left list to be merged.
    :param arrB (list): Second/right list to be merged.
    :return merged_arr (list): Resulting merged list.
    """
    merged_arr = []  # Start with a blank list
    while arrA and arrB:  # Loop until at least one has length 0
        # Pop the first value of the array which has the lower first value
        # And append that to the results list
        merged_arr.append((arrA if arrA[0] <= arrB[0] else arrB).pop(0))
    # Clean up any extra items, in case arrays are not the same length
    merged_arr = merged_arr + arrA + arrB
    return merged_arr