Python code that takes a string and prints the letters in decreasing order of frequency. code example
Example: Python code that takes a string and prints the letters in decreasing order of frequency.
#Code By Mark Thankappan
W= input('Please enter a string ')
def most_frequent(string):
d = dict()
for key in string:
if key not in d:
d[key] = 1
else:
d[key] += 1
return d
print (most_frequent(W))