fast efficient python
\ndef countMatches(self, items: List[List[str]], ruleKey: str, ruleValue: str) -> int:\n        count=0\n        if ruleKey==\'type\':\n            index=0\n   
```\ndef countMatches(self, items: List[List[str]], ruleKey: str, ruleValue: str) -> int:\n        count=0\n        if ruleKey==\'type\':\n            index=0\n        elif ruleKey==\'color\':\n            index=1\n        else:\n            index=2\n        for x in items:\n                if ruleValue==x[index]:\n                    count+=1\n        return count\n```
['Python', 'Python3']