class ListItem(object):
    def __init__(self, data, next=None, prev=None):
        self.data = data
        self.next = next
        self.prev = prev

class DoublyLinkedList(object):
    def __init__(self):
        self.head = None
        self.tail = None

    def insert(self, val):
        if self.head == None:
            self.head = self.tail = ListItem(val)
        else:
            self.head = ListItem(val, self.head)

@@ -9,32 +9,98 @@
 stItem(object):%0A
+    %22%22%22%0A    ListItem class to be used by DoublyLinkedList%0A    %22%22%22%0A
     def __init__
@@ -135,16 +135,16 @@
 =None):%0A
-
         
@@ -239,24 +239,82 @@
 st(object):%0A
+    %22%22%22%0A    DoublyLinkedList class using ListItem%0A    %22%22%22%0A
     def __in
@@ -376,16 +376,16 @@
 = None%0A%0A
-
     def 
@@ -403,16 +403,119 @@
 , val):%0A
+        %22%22%22%0A        insert function to insert a ListItem at head/front of DoublyLinkedList%0A        %22%22%22%0A
         

add comments for constructors and insert