Write a program to check whether two same values in a dictionary have different keys and print appropriate message
Answers
Answered by
2
dict=eval(input("Enter Dictionary : "))
lst=[]
for key in dict:
if(dict[key] not in lst):
lst.append(dict[key])
if(len(dict)==len(lst)):
print("No repeated values.")
else:
print("Contains repeated values.")
Similar questions