I know that in C ++ it already exists #include <list> Now I'm curious to know if this exists in python.
#include <list>
You can also look at the llist python packege, which provides some useful features that deque does not support. This package has not only a double link structure, but also one linked list structure. IMHO, one of the biggest advantages of this package is the ability to maintain links to list items.
llist
deque
Collections.deque seems to be a doubly linked list library in Python. According to the documentation, it should have approximately O (1) value when adding or popping out of the head or tail, and also O (n) for regular inserts (which is what is expected from the linked list).
API: http://docs.python.org/2/library/collections.html#collections.deque
Source: stack overflow