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)

Here is what the above code is Doing:
1. We start at the head of the list.
2. We check to see if the current node is None. If it is, we set the head to the new node.
3. If the current node is not None, we set the next node of the current node to the new node.
4. We set the current node to the new node.