Skip to content
Snippets Groups Projects
Commit 6a947602 authored by tnbeats's avatar tnbeats
Browse files

22211572

parent baaf0741
No related merge requests found
......@@ -3,17 +3,9 @@ def rotateR(val):
return val[-1] + val[:-1] if len(val) > 0 else None
# question 4
def rotateRx(val):
pass
val[:] = [val[-1]] + val[:-1]
# question 5
......@@ -25,5 +17,20 @@ def rotateRx_modified(val):
pass
# question 6
def rotateR2(val):
return rotateR(rotateR(val))
# question 7
def rotateRx2(val):
rotateRx(val)
rotateRx(val)
# question 8
l = [[1, 2, 3]] * 2
print(l)
rotateRx(l[1])
print(l)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment