For this Question: Given an array consisting of N integers, your task is to reverse every subarray of K group elements.
See example for better understanding.First line of input contains two space separated integers N and K, next line contains N space separated integers containing values of array.

Constraints:-
1 < = K < = N < =100000
1 < = Arr[i] < = 100000Print the modified array.Sample Input:-
6 2
1 2 3 4 5 6

Sample Output:-
2 1 4 3 6 5

Sample Input:-
5 3
1 2 3 4 5

Sample Output:-
3 2 1 4 5

Explanation:
Step 1: 3 2 1 4 5
No more steps can be done, I have written this Solution Code: n,k = map(int,input().split())
ls = list(map(int,input().split()))
for i in range(0,n,k):
	if (i+k)<=n:	print(*ls[i:i+k][::-1],end=' ')
	else:	print(*ls[i:]), In this Programming Language: Python, Now tell me if this Code is compilable or not?