diff --git a/2.7 Exercises.py b/2.7 Exercises.py index 8c5dbe2f8c12b8e47f4f70f03dc0db03b7f83adc..8c9740d8d9aebe3abd2d711a7722acd106f471f6 100644 --- a/2.7 Exercises.py +++ b/2.7 Exercises.py @@ -1,7 +1,16 @@ # question 1 +def rotateR(val): + return [val[-1]] + val[1:len(val)] + val[0] + + + + + + -def rotateR(val): - val[0],val[-1] = val[-1],val[0] +# question 4 +def rotateRx(val): + val[0],val[-1] = val[-1], val[0]