---
title: "Comment by Isaac Shiffman on \"Solving Valid Anagram\" | Hashnode"
description: "your python XOR solutuon is not valid. It does not work for the two strings s= &quot;aa&quot; and t=&quot;bb&quot; because it will return true in this case"
url: "https://hashnode.com/posts/solving-valid-anagram/64437f0fcaffef2b9f380b41/comment/65563b18676ebc4d9f66aaf4"
---

[Discussion](https://hashnode.com/posts/solving-valid-anagram/64437f0fcaffef2b9f380b41)

Comment [Solving Valid Anagram](https://hashnode.com/posts/solving-valid-anagram/64437f0fcaffef2b9f380b41)

[Isaac Shiffman](https://hashnode.com/@isaac99)

[Nov 16, 2023](https://hashnode.com/posts/solving-valid-anagram/64437f0fcaffef2b9f380b41/comment/65563b18676ebc4d9f66aaf4)

your python XOR solutuon is not valid. It does not work for the two strings s= "aa" and t="bb" because it will return true in this case

[Dhawal Pandya](https://hashnode.com/@dhawalpandya01)

[Nov 16, 2023](https://hashnode.com/posts/solving-valid-anagram/64437f0fcaffef2b9f380b41/comment/65563b18676ebc4d9f66aaf4#reply-65565ec8676ebc4d9f66ae2d)

You know what? That is correct, I had not thought of that edge case. Let me remove that solution.

Thank you for bring that to my attention, cheers.
