Something is blocking my python script email to the list. maybe the
hash-bang is triggering some sort of anti-virus filter.

Try again:

file_name = "/usr/share/dict/words"

file_id = open(file_name)
lines = file_id.readlines()
file_id.close()

freq_count = {}

for c in 'abcdefghijklmnopqrstuvwxyz':
    freq_count[c] = 0

for line in lines:
    freq_count[line[0]] += 1

key_value_list = freq_count.items()

value_key_list = [(v,k) for k,v in key_value_list]
value_key_list.sort()

for freq,letter in value_key_list:
    print freq,letter

Reply via email to