I'm currently trying to create a function that counts the frequency of characters in in a string. I need to store it in a dictionary in ASCII code. From this dictionary I need to calculate which letters do not appear in the string.
import string
result=string.ascii_uppercase
print(result)
string_1 = 'WSXFGTYUJNMKLOIUYGFDXCVBHJKLMNBVFDEW'
frequencies = {}
for char in string_1:
if char in frequencies:
frequencies[char] +=1
else:
frequencies[char]=1
print("per char frequenct in '{}'is :\n{}".format(string_1, str(frequencies)))
list(string_1.encode('ascii'))
alphabet=set(ascii_uppercase)
def find_missing_letter(string_1)
return alphabet - (string_1)
Print(find_missing_letter(string_1))
I've managed most of it just cant get it to identify which letters are not present in the string.