The quiz where the difficulty automagically adapts to the player's Python knowledge
This is a question page. You can use this page to bookmark a question. Start a new quiz!
from collections import deque my_deque = deque([1, 2, 3, 4, 5, 6]) my_deque.rotate(3) print(my_deque)
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. (pythontic.com/containers/deque/rotate)
Question difficulty: 🔵🔵🔵🔵🔵