import string
# python has already a variable containing all ascii upper case letters
all_uppercase_letters = string.ascii_uppercase
# python has also the variable string.uppercase, but this might vary
# depending on your computer's local settings (language settings)
# create the lookup table ( dict ),
#that shall contain the frequencies for all the letters in your file.
freq_table = {} # empty dict is {} / empty list is []
for letter in all_uppercase_letters:
freq_table[letter] = 0 # set all letter frequencies by default to 0
|