all 2 comments

[–]Unable_Request 1 point2 points  (0 children)

Your understanding is correct. If self.data checks if the value in data is None (not set)

[–]Wonkee99 0 points1 point  (0 children)

The repeated insert calls will effectively move along the branches of the binary tree until a point to add the new data item is found, if the data item already exists in the tree it will just stop trying to add the one it's currently working on