I am trying to count the occurrences of each letter of a word
word = input(\"Enter a word\")
Alphabet=[\'a\',\'b\',\'c\',\'d\',\'e\',\'f\',\'g\',\'h\',\'i\'
Initialize an empty dictionary and iterate over every character of the word. If the current character in present in the dictionary, increment its value by 1, and if not, set its value to 1.
word="Hello"
characters={}
for character in word:
if character in characters:
characters[character] += 1
else:
characters[character] = 1
print(characters)