class Solution:
# @param {string} s
# @param {string} t
# @return {boolean}
def isAnagram(self, s, t):
res = 0
for i in s:
res ^= ord(i)
for i in t:
res ^= ord(i)
return res == 0
Simple O(n) Python Solution

another fake code about this problem (after added case s = "aa" , t="bb")
if case s = "xaaddy" , t = "xbbccy"
see that fake code
https://leetcode.com/discuss/49641/abouttestscaseof242validanagram