num_vals = [0.0817, 0.0149, 0.0278, 0.0425, 0.127, 0.0223, 0.0202, 0.0609, 
    0.0697, 0.0015, 0.0077, 0.0402, 0.0241, 0.0675, 0.0751, 0.0193, 0.0009,
    0.0599, 0.0633, 0.0906, 0.0276, 0.0098, 0.0236, 0.0015, 0.0197, 0.0007]
letterGoodness = {letter: value for letter, value in map(None, string.
    ascii_uppercase, num_vals)}

def goodness(message):
    string_goodness = 0
for letter in message:
    letter = letter.upper()
if letter in list(letterGoodness.keys()):
    string_goodness += letterGoodness[letter]
return string_goodness
print(goodness('I eat'))
A value in a list, python