Computer Science, asked by vaibhavkulal433, 1 month ago

Write a program to check whether two same values in a dictionary have different keys and print appropriate message​

Answers

Answered by indiantechsmith
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