The contains
method will look very similar to your insert
method, but even simpler because all you have to do is check if the item exists. So, traverse the BST as usual and return False if you reach the end, or True if you find the element:
def contains(self, item):
current = self.root
while current:
if item == current.item:
return True
if item < current.item:
current = current.left
else:
current = current.right
return False