For this Question: Given a deque of N integers and an integer K. Reversing the first K elements of a deque and print it.First line contains an integer N and K.
Next line contains N space separated integers denoting elements of deque.

Constraints
1 <= K <= N <= 10^5
0 <= Ai<= 10^5Print N space separated integers - the elements of deque after reversing the first K elements.Sample Input 1:
5 2
1 2 3 4 5

Output 
2 1 3 4 5

Explanation:
Reversing : (1 2)(3 4 5) - > (2 1)(3 4 5) 

Sample Input 2:
4 3
1 3 4 2

Output 
4 3 1 2

Explanation
Reversing : (1 3 4)(2) - > (4 3 1)(2), I have written this Solution Code: lst1 = []  
lst2 = []  
lst3 = []

lst1 = [int(item) for item in input().split()]
lst2 = [int(item) for item in input().split()]

N = lst1[0]
K = lst1[1] 

for i in range(K):
    dgt = lst2.pop(0)
    lst3.append(dgt)

lst3.reverse()  
lst4 = lst3+lst2

for i in range(len(lst4)):
    print(lst4[i], end =" "), In this Programming Language: Python, Now tell me if this Code is compilable or not?