阅读量:2
题目:
题解:
class Solution: def isAnagram(self, s: str, t: str) -> bool: s_c = Counter(s) t_c = Counter(t) if(len(s_c) != len(t_c)): return False else: for key, value in s_c.items(): if t_c.get(key) != value: return False return True