records/07-25/adada.py
def rotate(self, nums, k):
        """
        Do not return anything, modify nums in-place instead.
        """
        if nums and k > 0:
            while k > 0:
                nums, val = nums[:-1], nums[-1]
                nums.insert(0, val)
                k -= 1

        print(nums)

        Do not return anything, modify nums in-place instead.
        
Do not return anything, modify nums in-place instead.
Do not return anything modify nums in - place instead .
def rotate(self, nums, k):
        if nums and k > 0:
            while k > 0:
                nums, val = nums[:-1], nums[-1]
                nums.insert(0, val)
                k -= 1
        print(nums)
def rotate ( self , nums , k ) : if nums and k > 0 : while k > 0 : nums , val = nums [ : - 1 ] , nums [ - 1 ] nums . insert ( 0 , val ) k -= 1 print ( nums )
Do not return anything, modify nums in-place instead.
Do not return anything modify nums in - place instead .
"""
        Do not return anything, modify nums in-place instead.
        """
self
nums
k