Create a deque with maxlen=4
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 with maxlen=4. Append the numbers 10, 20, 30, 40, 50, 60, 70 one at a time. Print the final contents as a list, then print the length.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.