Data Structure in Python like STL Stack?

Fredrik Lundh fredrik at pythonware.com
Mon Nov 28 10:15:02 EST 2005


Matt Keyes wrote:

> Is there a data structure in Python that is akin to the STL stack
> object in C++?

>>> import collections
>>> help(collections.deque)

...

class deque(__builtin__.object)
 |  deque(iterable) --> deque object
 |
 |  Build an ordered collection accessible from endpoints only.

...

</F>






More information about the Python-list mailing list