def delete_node(self, value):

curr_node = self.head

if curr_node and curr_node.data == value:

self.head = curr_node.next

curr_node = None

return

prev = None

while(curr_node and curr_node.data != value):

prev = curr_node

curr_node = curr_node.next

if curr_node is None:

return

else:

prev.next = curr_node.next

curr_node = None

def delete_at_position(self, pos):

if(self.head):

curr_node = self.head

if pos == 0:

self.head = curr_node.next

curr_node = None

return

prev = None

count = 0

while curr_node and count != pos:

prev = curr_node

curr_node = curr_node.next

count += 1

if curr_node is None:

return

prev = curr_node.next

curr_node = None