As you can see from the output of our sample application, we start off with our deque object with values 1 to 6 in the correct order. We then rotate forward by three places, and all of our elements correctly move three places forward.
We then attempt to rotate backwards by two, and again, we see that all of the elements within our array move back two spaces correctly:
$ python3.6 08_rotateDeque.py
Deque: deque(['1', '2', '3', '4', '5', '6'])
Deque: deque(['4', '5', '6', '1', '2', '3'])
Deque deque(['6', '1', '2', '3', '4', '5'])