For this Question: Separate an array of positive and negative integers while maintaining the relative order of the items using merge sort. All positive numbers should come after negative ones, with the relative order remaining the same.The first line of input will be n, which represents the array's length, followed by the n array items in the second line.

Constraints:
0< n <=100000
1<= arr[i] <= 100000The result should be an array with negative numbers separated at the front and the relative order of the elements preserved.Sample Input:
6
-1 1 2 -4 -6 5

Output:
-1 -4 -6 1 2 5, I have written this Solution Code: def saperate(arr):
    n=[]
    p=[]
    for i in range(len(arr)):
        if arr[i]<0:
            n.append(arr[i])
        else:
            p.append(arr[i])
    print(*n+p)
n=int(input())
arr=list(map(int,input().split()))
saperate(arr), In this Programming Language: Python, Now tell me if this Code is compilable or not?