def prepend(self,data):
new_node = Node(data)
if self.head is None:
self.head = new_node
self.tail = new_node
else:
new_node.next = self.head
self.head.prev = new_node
self.head = new_node
my_list.prepend(2)
my_list.prepend(3)
my_list.prepend(5)
my_list.prepend(7)
print(my_list) = 2 3 5 7
print(my_list.head.data) = 2
print(my_list.tail.data) = 7