I have to create and return a string representation of the in-order traversal of a Binary Search Tree. Below I do have the in order traversal, but I can not figure out how to change this into string form. I did try using + to concatenate them together, however it doesn't run on the terminal. I can also post my whole BST code if need. Please and thank you.
def in_order(self):
if self.__root is not None:
self._in(self.__root)
def _in(self, root):
if root is None:
return
if root is not None:
self._in(root.lchild)
print(str(root.value))
self._in(root.rchild)