I am trying to add elements to end of my linked list and do not see that happening. It always seem to add None to the end of the linked list. I am not sure why this happens and I am guessing this has to do something with someone my .next setup incorrectly. I am using python to implement my linked list. Can someone please help me with this

Below is my Node class

```
class Node: 
    def __init__(self):
        self.data = None
        self.next = None

    def get_data(self):
        return self.data

    def set_data(self, data):
        self.data = data

    def get_next(self):
        return self.next

    def set_next(self, node):
        self.next = node

```

And here is my linked list class with insert methods

```
class SingleyLinkedList:

    def __init__(self):
        self.head = Node()

    def insertAtHead(self, data):
        currentNode = self.head

        newNode = Node()
        newNode.set_data(data)  

        if currentNode != None:
            newNode.set_next(currentNode)
            self.head = newNode
            print("Inserted ", data, " at the head")
        else:
            self.head.set_next(newNode)

    def insertAtEnd(self, data):
        currentNode = self.head

        new_node = Node()
        new_node.set_data(data)

        while currentNode.get_next() != None:
            currentNode = currentNode.next

        currentNode.set_next(new_node)
        print("Inserted ", data, " at end")

    def printNode(self):
        print("\nPrinting the nodes")
        currentNode = self.head

        while currentNode.next != None:
            print(currentNode.data, " --> ", end="")
            currentNode = currentNode.next
        print(" NULL \n")

s = SingleyLinkedList()

s.insertAtHead(5)
s.printNode()

s.insertAtHead(10)
s.printNode()

s.insertAtHead(1)
s.printNode()

s.insertAtEnd(20)
s.printNode()

```

I get the below result,

> 
> Inserted 5 at the head
> 
> 
> Printing the nodes
> 5 --> NULL
> 
> 
> Inserted 10 at the head
> 
> 
> Printing the nodes
> 10 --> 5 --> NULL
> 
> 
> Inserted 1 at the head
> 
> 
> Printing the nodes 1 --> 10 --> 5 --> NULL
> 
> 
> Inserted 20 at end
> 
> 
> Printing the nodes 1 --> 10 --> 5 --> None --> NULL
> 
> 
>