Python 3 | 2-liner | Explanation
Explanation\n- Create a dict {ruleKey: index_of_rulekey}\n- Filter out items that satisfy the condition\n\n### Implementation\n\nclass Solution:\n    def countM
### Explanation\n- Create a dict `{ruleKey: index_of_rulekey}`\n- Filter out items that satisfy the condition\n\n### Implementation\n```\nclass Solution:\n    def countMatches(self, items: List[List[str]], ruleKey: str, ruleValue: str) -> int:\n        d = {\'type\': 0, \'color\': 1, \'name\': 2}\n        return sum(1 for item in items if item[d[ruleKey]] == ruleValue)\n```
['Python', 'Python3']