print the doubly linked list def listprint(selfnode)while (node is not none)print(node data)last node node node next dllist doubly_linked_list(dllist push( dllist push( dllist push( dllist listprint(dllist headwhen the above code is executedit produces the following result inserting into doubly linked list herewe are going to see how to insert node to the doubly link list using the following program the program uses method named insertwhich inserts the new node at the third position from the head of the doubly linked list create the node class class nodedef __init__(selfdata)self data data self next none self prev none create the doubly linked list class doubly_linked_listdef __init__(self)self head none define the push method to add elements def push(selfnewval)