Binary Search Tree Algorithm Python