Beats 81.2% of the python solutions at runtime.
Please upvote if you find the solution useful.\n\n# Code\n\nclass Solution:\n    def countMatches(self, items: List[List[str]], ruleKey: str, ruleValue: str) ->
Please upvote if you find the solution useful.\n\n# Code\n```\nclass Solution:\n    def countMatches(self, items: List[List[str]], ruleKey: str, ruleValue: str) -> int:\n        t=[]\n        color=[]\n        name=[]\n        for i in range(len(items)):\n            t.append(items[i][0])\n            color.append(items[i][1])\n            name.append(items[i][2])\n        if ruleKey == "type":\n            return t.count(ruleValue)\n        elif ruleKey == "color":\n            return color.count(ruleValue)\n        elif ruleKey == "name":\n            return name.count(ruleValue)\n```
['Python3']