Reference for Python (version 3)
Here you can browse Queues and Stacks for Python (version 3).
Spot something incorrect? You can open an issue or use the "Want to add or correct" link at the bottom of each column.
Creating and Destroying Simple Queues
Concept
Python's Implementation
Concept
Python (version 3)
from queue import Queue
Concept
Python (version 3)
queue.Queue
Concept
Python (version 3)
queue = Queue()
Concept
Python (version 3)
new_queue = queue
Concept
Python (version 3)
Not implemented in this language
Concept
Python (version 3)
del(queue)
Concept
Python (version 3)
linear data structure
Creating and Destroying Circular Queues
Concept
Python's Implementation
Concept
Python (version 3)
Not implemented in this language
Concept
Python (version 3)
Not implemented in this language
Concept
Python (version 3)
Not implemented in this language
Concept
Python (version 3)
Not implemented in this language
Concept
Python (version 3)
Not implemented in this language
Concept
Python (version 3)
Not implemented in this language
Concept
Python (version 3)
Not implemented in this language
Creating and Destroying Priority Queues
Concept
Python's Implementation
Concept
Python (version 3)
from queue import PriorityQueue
Concept
Python (version 3)
queue.PriorityQueue
Concept
Python (version 3)
queue = PriorityQueue()
Concept
Python (version 3)
new_queue = queue
Concept
Python (version 3)
Not implemented in this language
Concept
Python (version 3)
del(queue)
Concept
Python (version 3)
heap data structure
Creating and Destroying Double Ended Queues
Concept
Python's Implementation
Concept
Python (version 3)
from collections import deque
Concept
Python (version 3)
collections.deque
Concept
Python (version 3)
queue = deque(['One','Two','Three'])
Concept
Python (version 3)
new_queue = queue
Concept
Python (version 3)
mylist = ['One','Two','Three']
queue = deque(mylist)
Concept
Python (version 3)
del(queue)
Concept
Python (version 3)
linear data structure
Creating and Destroying Stacks
Concept
Python's Implementation
Concept
Python (version 3)
from queue import LifoQueue
Concept
Python (version 3)
queue.LifoQueue
Concept
Python (version 3)
stack = LifoQueue()
Concept
Python (version 3)
new_stack = stack
Concept
Python (version 3)
Not implemented in this language
Concept
Python (version 3)
del(stack)
Concept
Python (version 3)
linear data structure
Queue Operations
Concept
Python's Implementation
Concept
Python (version 3)
deque.append('Four')
queue.put('Four')
lifoqueue.put('Four')
simplequeue.put('Four')
Concept
Python (version 3)
Not implemented in this language
Concept
Python (version 3)
queue + mylist
Concept
Python (version 3)
Not implemented in this language
Concept
Python (version 3)
print(dequeue.pop())
print(queue.get())
print(lifoqueue.get())
print(simplequeue.get())
Concept
Python (version 3)
queue.pop()
queue.get()
lifoqueue.get()
simplequeue.get()
Concept
Python (version 3)
print(queue[-1])
Concept
Python (version 3)
print(queue[0])
Concept
Python (version 3)
queue.append(queue[-1])
Concept
Python (version 3)
Not implemented in this language
Concept
Python (version 3)
print(len(queue))
Concept
Python (version 3)
Not implemented in this language
Concept
Python (version 3)
mylist = queue
Concept
Python (version 3)
dequeue.clear()
Stack Operations
Concept
Python's Implementation
Concept
Python (version 3)
stack.append('Four')
Concept
Python (version 3)
print(stack.pop())
Concept
Python (version 3)
stack.pop()
Concept
Python (version 3)
print(stack[-1])
Concept
Python (version 3)
print(stack[0])
Concept
Python (version 3)
stack.append(stack[-1])
Concept
Python (version 3)
Not implemented in this language
Concept
Python (version 3)
print(len(stack))
Concept
Python (version 3)
Not implemented in this language
Concept
Python (version 3)
mylist = stack
Concept
Python (version 3)
stack.clear()
Iterating
Concept
Python's Implementation
Concept
Python (version 3)
Not implemented in this language
Concept
Python (version 3)
Not implemented in this language
Concept
Python (version 3)
Not implemented in this language
Concept
Python (version 3)
Not implemented in this language
Concept
Python (version 3)
Not implemented in this language
Concept
Python (version 3)
Not implemented in this language