For this Question: Given an array A of positive integers. Your task is to sort them in such a way that the first part of the array contains odd numbers sorted in descending order, rest portion contains even numbers sorted in ascending order.First line of each test case contains an integer N denoting the size of the array. The next line contains N space separated values of the array.

<b>Constraints:</b>
1 <b>&le;</b> N <b>&le;</b> 10<sup>5</sup>
0 <b>&le;</b> A[i] <b>&le;</b> 10<sup>6</sup>Print the space separated values of the modified array.Sample Input
7
1 2 3 5 4 7 10

Sample Output
7 5 3 1 2 4 10


Sample Input
7
0 4 5 3 7 2 1

Sample Output
7 5 3 1 0 2 4, I have written this Solution Code: def two_way_sort(arr, arr_len):
     
    l, r = 0, arr_len - 1
     
    k = 0
     
    while(l < r):
         
        while(arr[l] % 2 != 0):
            l += 1
            k += 1
             
        while(arr[r] % 2 == 0 and l < r):
            r -= 1
             
        if(l < r):
            arr[l], arr[r] = arr[r], arr[l]
             
    odd = arr[:k]
    even = arr[k:]
     
    odd.sort(reverse = True)
    even.sort()
     
    odd.extend(even)
     
    return odd
     
n = int(input())

lst = input()

arr = lst.split()

for i in range(len(arr)):
  arr[i] = int(arr[i])

result = two_way_sort(arr, n)
for i in result:
    print(str(i), end=" "), In this Programming Language: Python, Now tell me if this Code is compilable or not?