          else:
              node.next = self.head
              self.head = node
              
      def append(self, data):
          if data is None:
              return
          node = Node(data)
          if self.head is None:
              self.head = node
 
</s> remove         node = Node(data)
 </s> add         node = Node(data, next_node) </s> remove 
    def __len__(self):
        curr = self.head
        counter = 0
        while curr is not None:
            counter += 1
            curr = curr.next
        return counter
 </s> add  </s> remove     "    def append(self, data):\n",
 </s> add     "    def append(self, data, next_node=None):\n", </s> remove     "        node = Node(data)\n",
 </s> add     "        node = Node(data, next_node)\n", </s> remove     def __init__(self, head):
 </s> add     def __init__(self, head=None):
    def append(self, data, next_node=None):
          else:
              node.next = self.head
              self.head = node
              
    def append(self, data, next_node=None):
          if data is None:
              return
          node = Node(data)
          if self.head is None:
              self.head = node
keep keep keep keep replace keep keep keep keep keep
 Updated Node and LinkedList to allow setting the next pointer on init, or when appending a node.  This is useful for circular linked list problems. 
linked-lists/linked_list.py