I am trying to rotate the array by using following function:
def rotLeft(a,d):
temp=[]
temp.append(a[0:-1])
temp.insert(0,a[-1])
return temp
I should get output as 5 1 2 3 4
but I am getting 5,[1,2,3,4]
how to solve this problem