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.
Looks great, my python solution printed an unzipped list.
# separates n and d values into two variablesn,d=[int(x)forxininput().split()]# creates list of integerslst=[int(x)forxininput().split()]# From inner most function to outermost=============# creates a list using lst[d:] and combines it with lst[0:d]# unzips list (* = unzips)# prints listprint(*(lst[d:]+lst[0:d]))
Left Rotation
You are viewing a single comment's thread. Return to all comments →
Looks great, my python solution printed an unzipped list.