Please help me to use python write this question thanks They

Please help me to use python write this question, thanks.

They Might be Giants has a song called \"E\'s Eat Anything\", AT the conclusion of the song we find that the letter Z likes to eat E\'s. Count how many times the letter Z is followed by the letter E in a string.

Solution

str = \"zezazbzezezczez\"
count = 0
# loop through string
for i in range(1,len(str)):
   # if string in pattern ze increment count
   if(str[i-1]==\"z\" and str[i]==\"e\"):
       count += 1
print count
\"\"\"
sample output

4
\"\"\"

Please help me to use python write this question, thanks. They Might be Giants has a song called \

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site