Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #append #method #linked #list #python
ADD COMMENT
Topic
Name
5+8 =