class Solution: def areOccurrencesEqual(self, s: str) -> bool: fa = s.count(s[0]) for c in set(s): if s.count(c) != fa: return False return True