You are viewing a single comment's thread. Return to all comments →
Python
def deleteNode(llist, position): if position == 0: llist = llist.next else: previous = llist for _ in range(position - 1): previous = previous.next to_delete = previous.next following = to_delete.next previous.next = following del to_delete return llist
Delete a Node
You are viewing a single comment's thread. Return to all comments →
Python