Super easy solution in python. (beats 100%) - one liner solution.
IntuitionHere we need to find that if the string present in array starts with the given prefix.ApproachThe approach for this is super easy. We just need to loop
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->
Here we need to find that if the string present in array starts with the given prefix.

# Approach
<!-- Describe your approach to solving the problem. -->
The approach for this is super easy. We just need to loop through words list and check if it starts with given prefix using ***s.startswith()*** function. If it is true increase the count and after looping return the count.

# Complexity
- Time complexity: O(n*m)
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity: O(1)
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```python3 []
class Solution:
    def prefixCount(self, words: List[str], pref: str) -> int:
        c = 0
        for i in words:
            if i.startswith(pref):
                c += 1
        return c
```

# One liner solution  🗿
```
class Solution:
    def prefixCount(self, words: List[str], pref: str) -> int:
        return sum(1 for x in words if x.startswith(pref))
```

**Hope so you like this !**

['Array', 'String', 'String Matching', 'Python3']