input: Write a python function to create a Binary Search Tree (BST) from a list of integers and verify its structure.
  assert createTree([1, 3, 5, 7, 9]).val == 1
  assert createTree([1, 3, 5, 7, 9]).right.val == 3
  assert createTree([1, 3, 5, 7, 9]).right.right.val == 5
  assert createTree([1, 3, 5, 7, 9]).right.right.right.val == 7
  assert createTree([1, 3, 5, 7, 9]).right.right.right.right.val == 9
output: class TreeNode:
      def __init__(self, val=0, left=None, right=None):
          self.val = val
          self.left = left
          self.right = right
  
  def createTree(nums):
      if not nums:
          return None
      
      def insert_into_bst(root, val):
          if not root:
              return TreeNode(val)
          if val < root.val:
              root.left = insert_into_bst(root.left, val)
          else:
              root.right = insert_into_bst(root.right, val)
          return root
      
      root = None
      for num in nums:
          root = insert_into_bst(root, num)
      
      return root