Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def move_to_next(self):
- if self.curr.next == None:
- return
- else:
- self.curr.data = self.curr.next.data
- self.curr.next = self.curr.next.next
- self.curr.prev = self.curr.next.prev
- def move_to_prev(self):
- if self.curr == None:
- return
- else:
- self.curr.data = self.curr.prev.data
- self.curr.next = self.curr.prev.next
- self.curr.prev = self.curr.prev.prev
- def remove(self):
- if self.curr == None:
- return
- else:
- self.curr.data = self.curr.next.data
- self.curr.prev.next = self.curr.next
- self.curr.next.prev = self.curr.prev
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement