```
class Solution:
# @param nums, a list of integer
# @param k, num of steps
# @return nothing, please modify the nums list in-place.
def rotate(self, nums, k):
n = len(nums)
return nums[n-k:n]+nums[:n-k]
```

However the solution I got is different from online. For example, [1,2], 1

Where I got is [2,1], but the judger got [1, 2]

```
class Solution:
# @param nums, a list of integer
# @param k, num of steps
# @return nothing, please modify the nums list in-place.
def rotate(self, nums, k):
n = len(nums)
return nums[n-k:n]+nums[:n-k]
```

However the solution I got is different from online. For example, [1,2], 1

Where I got is [2,1], but the judger got [1, 2]

class Solution:

def rotate(self, nums, k):

n = len(nums)

m = []

for i in range(n):

m.append(nums[(i +n - k) % n])

nums = m

nums = []

for i in range(n):

nums.append(m[i])

[1,2], 1 Where I got is [2,1], but the judger got [1, 2]

]]>Input: [1,2], 1

Output: [1,2]

Expected: [2,1] ]]>