# question 1 def rotateR(val): return [val[-1]] + val[1:len(val)] + val[0] # question 4 def rotateRx(val): val[0],val[-1] = val[-1], val[0]