x = "Abe!!4"
count = {}
for s in x.lower():
if s == ' ' or s.isdigit() or s in '!@#$%^&*()></?:"':
continue
elif s in count.keys():
count[s] += 1
else:
count[s] = 1
This is the result I get.
count = {'a': 1, 'e': 1, 'b': 1}
I want to append the keys with identical values/and or the max value into a list so I can sort them an return the first index. It should be easy but I can't find anything on the internet to help. I'm sure it's simple. Help me! what am I missing!?
Created at: 2014/09/26 17:20; Updated at: 2014/10/02 21:26