Number of Occurences of Character

PHOTO EMBED

Wed Dec 21 2022 14:55:00 GMT+0000 (Coordinated Universal Time)

Saved by @sukumar #python

string=input('enter string:')
char=input('enter character you want to count:')
count=0
for i in string:
    if i==char:
        count+=1
print('The number of occurance of character',char,'is',count)
content_copyCOPY