Learn Tree Traversal by Building a Binary Search Tree - Step 46

I am genuinely confused what I did wrong, does it want me to assign the return value of the helper function to a variable?
These are the instructions:
Within the inorder_traversal method, start the in-order traversal by calling the helper method _inorder_traversal and pass the BST root and the result list as the arguments.

This will start the traversal from the root of the binary search tree (self.root), and the result list will be passed to accumulate the keys during the traversal.

def inorder_traversal(self):
        result = []
        _inorder_traversal(self.root, result)

Welcome to our community!

Post a link to the challenge.

Welcome to the forum @cjpalmer330

You need to include self. at the start of the your expression.

Happy coding

oof I feel stupid. Thank you!

2 Likes