Deque in Python

Last Updated : 11 Dec, 2025

A deque stands for Double-Ended Queue. It is a special type of data structure that allows you to add and remove elements from both ends efficiently. This makes it useful in applications like task scheduling, sliding window problems and real-time data processing.

Python
from collections import deque 
    
# Declaring deque 
de = deque(['name','age','DOB'])  
    
print(de)

Output
deque(['name', 'age', 'DOB'])