advanced linked lists to the preceding nodeas illustrated in figure to create the individual nodeswe must add third field to the node classwhich we name dlistnode to reflect its use with doubly linked listas shown in listing listing storage class for doubly linked list node class dlistnode def __init__selfdata )self data data self next none self prev none head reference is again used to reference the first node in the list tail referencealthough optionalis commonly used with doubly linked list to take advantage of the reverse chainwhich allows for traversals from back to front the last node is indicated by null reference in the next link of the last node as was done in the singly linked list but we must also indicate the first node since the list can be traversed in reverse order this is done using null reference in the prev link of the first node head tail figure doubly linked list with four nodes doubly linked list can be sorted or unsorted depending on the specific application the implementation of the various operations for an unsorted doubly linked list are very similar to those of the unsorted singly linked list we leave the implementation of these operations as an exercise and only focus on the use and management of sorted doubly linked lists list operations the position of the nodes in sorted doubly linked list are based on the key value of the corresponding data item stored in each node the basic linked list operations can also be performed on doubly linked list traversals the doubly linked list allows for traversals from front to back or back to front the traversals are performed using temporary external reference to mark the current node the only difference is which node we start with and which link field is used to advance the temporary reference traversing the doubly linked list from