Computer Science, asked by djain31804, 8 months ago

Write a program to count the number of ‘e’ in a string. In python with simple codes.

Answers

Answered by fesarin651
1

Answer:

s=input('Enter a string')

c=0

for i in s:

if i=='e':

c=c+1

print(c)

PS: The if and statement with the variable should be indented properly. I

Similar questions