✅ [Python] 1 Line || Detailed Explanation || Clean and Easy to Understand
PLEASE UPVOTE if you like \uD83D\uDE01 If you have any question, feel free to ask. \n\n\n\n\n\nclass Solution(object):\n    def rotate(self, nums, k):\n        
**PLEASE UPVOTE if you like** \uD83D\uDE01 **If you have any question, feel free to ask.** \n\n\n\n\n```\nclass Solution(object):\n    def rotate(self, nums, k):\n        nums[:] = nums[-(k % len(nums)):] + nums[:-(k % len(nums))]\n```\n![image](https://assets.leetcode.com/users/images/4cc8eab5-1c11-4042-a60b-3d824cae2113_1643522511.6529794.png)\n\n\n**PLEASE UPVOTE if you like** \uD83D\uDE01 **If you have any question, feel free to ask.**
['Python']