"""求字典中value有重复元素的key,并返回"""
a= {'a':'a','b':'add','c':'asd','d':'dd'}
b = []
"""第一种实现方法"""
for i in a.values():
if len(set(i)) != len(i):
b.append(list(a.keys())[list(a.values()).index(i)])
print(b)
"""第二种实现方法"""
for k ,v in a.items():
if len(set(v)) != len(v):
b.append(k)
print(b)