Question: It's a python and code to count and print out characters I cannot figure out what errors are please help me to fix the codes.
It's a python and code to count and print out characters
I cannot figure out what errors are please help me to fix the codes.
def creat_dict(words_list): alpha_dict = () alpha_upper = list("abcdefghijklmnopqurstuvwxyz".upper()) #print(alpha_upper) for elem in alpha_upper: alpha_dict(elem) = (0, []) #print(alpha_dict) for elem in words_list: alpha_dict(elem[0])[0] += 1 alpha_dict(elem[0])[1].append(words_list.index(elem)) return alpha_dict creat_dict(['Abject' , 'Yoke', 'Aberration'])
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
