input: Write a function to create a binary search tree from a list of integers.
  assert createTree([5, 3, 7, 2, 4, 6, 8]).data == 5
  assert createTree([5, 3, 7, 2, 4, 6, 8]).left.data == 3
  assert createTree([5, 3, 7, 2, 4, 6, 8]).right.data == 7
output: class TreeNode:
      def __init__(self, data):
          self.data = data
          self.left = None
          self.right = None
  
  def insert(root, data):
      if root is None:
          return TreeNode(data)
      else:
          if data < root.data:
              root.left = insert(root.left, data)
          else:
              root.right = insert(root.right, data)
      return root
  
  def createTree(lst):
      if not lst:
          return None
      root = TreeNode(lst[0])
      for data in lst[1:]:
          insert(root, data)
      return root