We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
n,d=map(int,input().split(' '))arr=list(map(int,input().split(' ')))# spliting array into two partsy=arr[:d:]z=arr[d::]# extending second list with first list instead of using for loop.z.extend(y)#unpacking list to string itemsprint(*z)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Left Rotate the Array
You are viewing a single comment's thread. Return to all comments →
Python