  
  class Node(object):
      def __init__(self, data):
          self.next = None
          self.data = data
          
      def __str__(self):
          return self.data
  
 
</s> remove     def __init__(self, head):
 </s> add     def __init__(self, head=None): </s> remove     "    def __init__(self, data):\n",
    "        self.next = None\n",
 </s> add     "    def __init__(self, data, next_node=None):\n",
    "        self.next = next_node\n", </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):
 </s> add     def append(self, data, next_node=None): </s> remove         node = Node(data)
 </s> add         node = Node(data, next_node)
    def __init__(self, data, next_node=None):
        self.next = next_node
  
  class Node(object):
    def __init__(self, data, next_node=None):
        self.next = next_node
    def __init__(self, data, next_node=None):
        self.next = next_node
          self.data = data
          
      def __str__(self):
          return self.data
  
keep keep replace 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