1.

Write a program to count number of ‘s’ in the string ‘successor’.

Answer»

def letcount ( ) :

word = ‘successor’ 

count = 0 

for letter in word :

if letter = = ‘s’ : 

count = count + 1 

print (count)



Discussion

No Comment Found