title: Is this the correct implementation of a recursive search function in a Linked List?
body: <pre><code>class Node:
    def __init__(self, data):
      self.data = data
      self.next = None
  
  class LinkedList:
    def __init__(self, head=None):
      self.head = head
  
    def insert(self, node):
      if not self.head:
        self.head = node
      else:
        node.next = self.head
        self.head = node
  
    def search(self, node):
      if self.head == node:
        return self.head
      else:
        if self.head.next:
          self.head = self.head.next
          return self.search(node)
  </code></pre>
  
  <p>I have a feeling that that resetting the head to head.next isn't quite right. If it's not, how can my recursive function move to the next node?</p>