Solution in Python
Easy to understand\n\nclass Solution(object):\n    def countMatches(self, items, ruleKey, ruleValue):\n        d = {\'type\':0,\'color\':1,\'name\':2} #dictiona
Easy to understand\n```\nclass Solution(object):\n    def countMatches(self, items, ruleKey, ruleValue):\n        d = {\'type\':0,\'color\':1,\'name\':2} #dictionary that stores the keys\n        c = 0                             #initialize the counter to zero\n        index = d[ruleKey]                #take the index to be searched from the dictionary\n        for item in items:                #iterate through the given items list\n            if item[index] == ruleValue:  #check if the given value is same as the index value\n                c += 1                    #if true increment the counter\n        return c                          #finally return the counter value which represents the number of occurances\n```
['Python', 'Python3']