Program to Split an Array from Specified Position & Add First Part to the End.


l1=list(map(int,input().split()))
p=int(input())
l1=l1[p:]+l1[:p]
print(l1)



 Input: 1 2 3 8 4 9 6 5 12 16 4 
 Output: 4, 9, 6, 5, 12, 16, 1, 2, 3, 8

No comments:

Post a Comment