How to traverse a binary search tree in Python?