def duplicate_count(text):
text = text.upper()
duplicate_count = 0
for i in set(text):
if text.count(i)>1:
duplicate_count +=1
return duplicate_count
in the for loop why only set is used and not list or dict? In the for loop i in the set(text) will have duplicates right ?