Count the Number of Consistent Strings LeetCode solution in Python
1# Runtime: 236 ms (Top 95.16%) | Memory: 16 MB (Top 85.69%)2class Solution:3def countConsistentStrings(self, allowed: str, words: List[str]) -> int:4allowed = set(allowed)5count = 067for word in words:8for letter in word:9if letter not in allowed:10count += 111break1213return len(words) - count