in the example the given list of strings are raju ,plays,golf
the word plays has the maximum number of distinct letters so the output should be plays
sample input 1
raju plays golf
sample out put 1
plays
sample inpput 2
Drink four liters of water every day
sample output 2
liters
lst = input().split()
llst = [len(set(x)) for x in lst]
print(lst[llst.index(max(llst))])
Comments
Leave a comment