doubly linked lists can be traversed in any direction depending on the operation being performeda node within doubly linked list can easily refer to its previous node where necessary without having to designate variable to keep track of that node because singly linked list can only be traversed in one direction it may sometimes mean moving to the start or beginning of the list in order to effect certain changes buried within the list since there is immediate access to both next and previous nodesdeletion operations are much easier to performas you will see later on in this doubly linked list node the python code that creates class to capture what doubly linked list node is includes in its initializing methodthe prevnextand data instance variables when node is newly createdall these variables default to noneclass node(object)def __init__(selfdata=nonenext=noneprev=none)self data data self next next self prev prev the prev variable holds reference to the previous nodewhile the next variable continues to hold reference to the next node doubly linked list it is still important to create class that captures the data that our functions will be operating onclass doublylinkedlist(object)def __init__(self)self head none self tail none self count for the purposes of enhancing the size methodwe also set the count instance variable to head and tail will point to the head and tail of the list when we begin to insert nodes into the list