2283. Check if Number Has Equal Digit Count and Digit Value Updated: 2024-03-12 1 min read Algorithms , LeetCode On This PageLeetCode problem 2283class Solution: def digitCount(self, num: str) -> bool: cnt = Counter(num) return all(cnt[str(i)] == int(v) for i, v in enumerate(num))