def rotate_right(L, k):
"""
Circular right rotation of L, k times
"""
M = L[:]
for i, _ in enumerate(L):
M[(i + k) % len(L)] = L[i]
return M
Thu Jul 27 00:58:06 2017
def rotate_right(L, k):
"""
Circular right rotation of L, k times
"""
M = L[:]
for i, _ in enumerate(L):
M[(i + k) % len(L)] = L[i]
return M