Move first element to last

Program to move first element to last in list

n = int(input())
li = list(map(int,input().split()))[:n]
#Pop 0 index element and append the popped element
li.append(li.pop(0))
print(*li)
OUTPUT:
5
1 2 3 4 5
2 3 4 5 1