Create a deque from [1, 2, 3]
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- medium
Problem
Create a deque from [1, 2, 3]. Use appendleft(0) to add to the left, and rotate(1) to shift elements right by 1 position. Print the deque after each operation as a list.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.