Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def rightRotate(lists):
- last = list[len(list) - 1]
- for i in range(len(list)-2, -1, -1):
- list[i+1] = list[i]
- list[0] = last
- values = input()
- items = values.split(" ")
- list =[]
- for i in items:
- list += [i]
- rightRotate(list)
- for j in range(len(list)):
- print(list[j], end=' ')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement