append method linked list python code example
Example: append method linked list python
def append(self,item):
current = self.head
if current:
while current.getNext() != None:
current = current.getNext()
current.setNext(Node(item))
else:
self.head = Node(item)