Counting words with a given prefix
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n![countingwords.PNG](https://assets.leetcode.com/users/images/8d68c99b-176b-4804-a2bf-630bc38328e6_1677757448.8018465.png)\n\n# Code\n```\nclass Solution:\n    def prefixCount(self, words: List[str], pref: str) -> int:\n        count=0\n        for i in words:\n            if pref in i and i.index(pref)==0:\n                print(i)\n                count+=1\n        return count\n```
['Python3']