Dashboard Temp Share Shortlinks Frames API

HTMLify

LeetCode - Counting Words With a Given Prefix - Python
Views: 332 | Author: abh
1
2
3
class Solution:
    def prefixCount(self, words: List[str], pref: str) -> int:
        return len(list(filter(lambda e:e.startswith(pref), words)))