Generation

generate functionWed, 12 Apr 2023

que pida una frase y cuente las letras hay de cada una

word = input("Write a word: ") def count_letter(word): d = {} for w in word: if w in d: d[w] += 1 else: d[w] = 1 print(d) count_letter(word)

Questions about programming?Chat with your personal AI assistant