SHARE
TWEET

Untitled

a guest Oct 17th, 2019 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def append(self, value) -> None:
  2.         # assign first node in curr
  3.         curr = self._first
  4.         # if curr is None, create new node
  5.         if curr is None:
  6.             self._first = Node(value)
  7.         else:
  8.             # tranverse nodes until next node is None
  9.             while curr._next is not None:
  10.                 curr = curr._next
  11.             curr._next = Node(value)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top