class Solution:
def isAnagram(self, s, t):
"""
:type s: str
:type t: str
:rtype: bool
"""
return set(s) == set(t) and all(s.count(i) == t.count(i) for i in set(s))
leetcode-242 有效的字母异位词 python版本
最新推荐文章于 2023-12-30 20:17:05 发布