Simple 5 Line Python Code
Code:\n\nclass Solution:\n    def searchBST(self, root: Optional[TreeNode], val: int) -> Optional[TreeNode]:\n        if root is None or root.val == val: # If e
**Code:**\n```\nclass Solution:\n    def searchBST(self, root: Optional[TreeNode], val: int) -> Optional[TreeNode]:\n        if root is None or root.val == val: # If end is reached or a node with a value of target is found found.\n            return root # Return that node.\n\t\t# If target > current nodes value search in left side of node else search rightwards.\n        return self.searchBST(root.left,val) if root.val > val else self.searchBST(root.right,val) \n```\n**One Liner Code:**\n```\nclass Solution:\n    def searchBST(self, root: Optional[TreeNode], val: int) -> Optional[TreeNode]:\n        return root if not root or root.val == val else self.searchBST(root.left if root.val > val else root.right, val)\n```\n**Results:**\n![image](https://assets.leetcode.com/users/images/b8a93e86-9978-4023-ab6e-73759ea6ea30_1649906877.2815614.png)\n
['Python', 'Python3']