Hi all,

Thanks for helping!

I wrote this answer:

```
def isSameTree(self, p, q):
if p == None and q == None:
return True
elif p == None or q == None:
return False
elif p != q:
return False
else:
left_ = self.isSameTree(p.left, q.left)
right_ = self.isSameTree(p.right, q.right)
return left_ and right_
```

but oj shows my output is false while inputs are {0}, {0}, the expected result should be true.

Then I read others answers, I found when I use : p.val != q.val

The output is correct and has been accepted.

I am confused by these two difference, can anyone explain this?

Thanks a lot!!