3 thoughts on “Udacity – Intro to Computer Science – Python – Crypto Analysis – Letter Frequency”

  1. See below code, i think its much better to understand and outputs the same required result.
    def freq_analysis(message):
    alpha = ‘abcdefghijklmnopqrstuvwxyz’
    freq=[]
    for i in range(0,26):
    counter=float(message.count(alpha[i])/len(message))
    freq.append(counter)
    return freq

Comments are closed.