classSolution:""" @param s: The first string @param b: The second string @return true or false """defanagram(self,s,t):# write your code hereiflen(s)!=len(t):returnFalsestr_len=len(s)# declare an array for alphabet and other special characters listsalphabet=[0]*256# count number of appearance for each letter in s and tforiinrange(0,str_len):alphabet[ord(s[i])-ord('a')]+=1alphabet[ord(t[i])-ord('a')]+=1foriinrange(0,26):ifalphabet[i]%2!=0:returnFalsereturnTrue