Question #244

What is the output of the code snippet below?
from collections import deque
my_deque = deque([1, 2, 3, 4, 5, 6])

The rotate() method of the collections.deque class rotates the sequence present in the deque object n times. When n is positive, the rotation happens to the right, when n is negative, the rotation happens to the left. (

Comment on Disqus:

Question difficulty: 🔵🔵🔵🔵🔵