deque() object : Deque : Data Structure PYTHON examples


PYTHON examples » Data Structure » Deque »

 

deque() object


deque() object: faster appends and pops from the left side but slower lookups in the middle.



from collections import deque
d = deque(["A""B""C"])
d.append("D")
print "Handling", d.popleft()


           
       



    Related Scripts with Example Source Code in same category :

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo Data Structure
» Deque