#! /usr/bin/env python3
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2022 liangliang <liangliang@Liangliangs-MacBook-Air.local>
#
# Distributed under terms of the MIT license.
class Solution:
    def countMatches(self, items: List[List[str]], ruleKey: str, ruleValue: str) -> int:
        res = 0
        d = {'type':0, 'color':1, 'name':2}
        for l in items:
            if l[d[ruleKey]] == ruleValue:
                res += 1
        
        return res 

81fd6ffa160fd174d5686ff6662e9fbc932eeb1a
<mask token>

class Solution:
    <mask token>

class Solution:

    def countMatches(self, items: List[List[str]], ruleKey: str, ruleValue: str
        ) ->int:
        res = 0
        d = {'type': 0, 'color': 1, 'name': 2}
        for l in items:
            if l[d[ruleKey]] == ruleValue:
                res += 1
        return res

#! /usr/bin/env python3
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2022 liangliang <liangliang@Liangliangs-MacBook-Air.local>
#
# Distributed under terms of the MIT license.
class Solution:
    def countMatches(self, items: List[List[str]], ruleKey: str, ruleValue: str) -> int:
        res = 0
        d = {'type':0, 'color':1, 'name':2}
        for l in items:
            if l[d[ruleKey]] == ruleValue:
                res += 1
        
        return res 
