a = [1, 2, 3, 4, 5] K = int(input()) n = len(a) for i in range(K % n): temp = a[-1] for i in range(n - 1, 0, -1): a[i] = a[i - 1] a[0] = temp print(a)
To embed this project on your website, copy the following code and paste it into your website's HTML: