Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def __contains__(self, value):
- ''' (LinkedList, object) -> bool
- Return whether LinkedList (self) contains value.
- '''
- curr_node = self.front
- while curr_node:
- if curr_node.value == value:
- return True
- curr_node = curr_node.nxt
- return False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement