def isAnagram(self, s, t):
return ''.join(sorted(s)) == ''.join(sorted(t))
I think sorted function in python return a list. so you don't need to use join method and just compare the two list
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.