Python short and efficient
\nfrom collections import defaultdict\n\nclass Solution:\n    def numMatchingSubseq(self, s: str, words: List[str]) -> int:\n        words = [iter(word) for wor
```\nfrom collections import defaultdict\n\nclass Solution:\n    def numMatchingSubseq(self, s: str, words: List[str]) -> int:\n        words = [iter(word) for word in words]\n\n        heads = defaultdict(list)\n        for w in words:\n            heads[next(w)].append(w)\n\n        for c in s:\n            ws, heads[c] = heads[c], []\n\n            for w in ws:\n                if c2 := next(w, None):\n                    heads[c2].append(w)\n\n        return len(words) - sum(len(l) for l in heads.values())\n```\n1. Turn all words into iterators at the start\n2. Collect words in a dictionary with their first character as key\n3. Iterate through all characters in search string and process all values in the dictionary with that character as the key\n4. Finally, return the difference between the number of words and the number of remaining words
['Python']