I am trying to count the numbers of "e" in a word without using count.(). I made a definition but it outputs this:
0
1
1
2
How do I make it output just 2 ?
def letter_e(word):
count = 0
for letter in word:
if letter == "e" :
count += 1
print(count)
letter_e("fefe")