My solution by using Python
class Solution:\n        # @param nums, a list of integer\n        # @param k, num of steps\n        # @return nothing, please modify the nums list in-place.\n 
    class Solution:\n        # @param nums, a list of integer\n        # @param k, num of steps\n        # @return nothing, please modify the nums list in-place.\n        def rotate(self, nums, k):\n            n = len(nums)\n            k = k % n\n            nums[:] = nums[n-k:] + nums[:n-k]\n        \n\nA little important thing to be cautious:  \n\n    nums[:] = nums[n-k:] + nums[:n-k] \ncan't be written as:\n\n    nums = nums[n-k:] + nums[:n-k]\n\non the OJ. \n    \nThe previous one can truly change the value of **old** *nums*, but the following one just changes its reference to a **new** *nums* not the value of **old** *nums*.
[]