rishiilluri

Untitled

Sep 2nd, 2022
832
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.16 KB | None | 0 0
  1. input1 = str(input())
  2. p = int(input())
  3.  
  4. nums = input1.split(",")
  5.  
  6.  
  7. n = len(nums)
  8. p = p%n
  9.  
  10. nums2 = nums[-p:]
  11. nums2.extend(nums[0:n-p])
  12.  
  13. print(nums2)
Advertisement
Add Comment
Please, Sign In to add comment