Complete the code to create an empty deque using Python's collections module.
from collections import deque my_deque = deque([1]) print(my_deque)
To create an empty deque, you pass an empty list [] to deque().
Complete the code to add an element 10 to the right end of the deque.
from collections import deque my_deque = deque([]) my_deque.[1](10) print(my_deque)
Use append to add an element to the right end of the deque.
Fix the error in the code to remove an element from the left end of the deque.
from collections import deque my_deque = deque([1, 2, 3]) removed = my_deque.[1]() print(removed) print(my_deque)
Use popleft() to remove and return the element from the left end of the deque.
Fill both blanks to rotate the deque one step to the right.
from collections import deque my_deque = deque([1, 2, 3, 4]) my_deque.[1]([2]) print(my_deque)
Use rotate(1) to move all elements one step to the right.
Fill all three blanks to create a deque, add 5 to the left, and remove from the right.
from collections import deque my_deque = deque([1]) my_deque.[2](5) removed = my_deque.[3]() print(removed) print(my_deque)
Start with deque([1, 2, 3]), add 5 to the left with appendleft, then remove from right with pop.
