Write a function to identify to count no of instances of a value inside a dictionary


Topic: Write a function to identify to count no of instances of a value inside a dictionary

Solution

def count_value(d:dict, value)->bool:
    return list(v == value for v in dict.values()).count(True)



List all Python Programs