title: BST insertion function in Python
body: <p>I am implementing BST in python and having some trouble on insertion function.</p>
  
  <pre><code>class Node:
      def __init__(self, val):
          self.data = val
          self.Leftchild = self.Rightchild = None
  
  
  class Tree:
      def __init__(self):
          self.root = None
  
      def insert(self, val):
          if self.root is None:
              self.root = Node(val)
              return self.root
          else:
              if self.root.data &lt;= val:
                  self.root.Rightchild = self.insert(self.root.Rightchild, val)
              else:
                  self.root.Leftchild = self.insert(self.root.Leftchild, val)
              return self.root
  if __name__ == '__main__':
      tree = Tree()
      for i in range(10):
          tree.insert(random.randint(0,100))
  </code></pre>
  
  <p>I got TypeError on recursive.</p>
  
  <pre><code>TypeError: insert() takes 2 positional arguments but 3 were given
  </code></pre>
  
  <p>Isn't <code>self.root.Rightchild</code> or <code>self.root.Leftchild</code> considered same as <code>self</code>?
  If my thought is wrong, how can I implement recursive insertion function in this case?
  Thanks in advance!</p>