list python data structures we have already seen linked list in earlier in which it is possible only to travel forward in this we see another type of linked list in which it is possible to travel both forward and backward such linked list is called doubly linked list following is the features of doubly linked list doubly linked list contains link element called first and last each link carries data field(sand two link fields called next and prev each link is linked with its next link using its next link each link is linked with its previous link using its previous link the last link carries link as null to mark the end of the list creating doubly linked list we create doubly linked list by using the node class nowwe use the same approach as used in the singly linked list butthe head and next pointers will be used for proper assignation to create two links in each of the nodes in addition to the data present in the node class nodedef __init__(selfdata)self data data self next none self prev none class doubly_linked_listdef __init__(self)self head none adding data elements def push(selfnewval)newnode node(newvalnewnode next self head if self head is not noneself head prev newnode self head newnode