Simplest Python solution. Use startswith
\n\n# Code\n\nclass Solution:\n    def prefixCount(self, words: List[str], pref: str) -> int:\n        cnt = 0\n        for s in words:\n            if s.starts
\n\n# Code\n```\nclass Solution:\n    def prefixCount(self, words: List[str], pref: str) -> int:\n        cnt = 0\n        for s in words:\n            if s.startswith(pref):\n                cnt += 1\n        return cnt\n```
['Python3']