Is my letter counter too complex?
In python exercise, we have to make a letter counter. I have seen other solutions, but is my solution too complex? Here is my code: text = input() dictionary = { 'a' : 0, 'b' : 0, 'c' : 0, 'd' : 0, 'e' : 0, 'f' : 0, 'g' : 0, 'h' : 0, 'i' : 0, 'j' : 0, 'k' : 0, 'l' : 0, 'm' : 0, 'n' : 0, 'o' : 0, 'p' : 0, 'q' : 0, 'r' : 0, 's' : 0, 't' : 0, 'u' : 0, 'v' : 0, 'w' : 0, 'x' : 0, 'y' : 0, 'z' : 0 } new_text = list(text) for i in range(len(new_text)): dictionary[new_text[i]] += 1 new_dict = dict() for j in range(len(new_text)): x = new_text[j] y = dictionary.get(new_text[j]) new_dict.update({x : y}) print(new_dict)