Computer Science, asked by ayyalusamy1975, 3 months ago

WAP to print the number of occurrences of a substring into a line. ​

Answers

Answered by Anonymous
6

Answer:

hello,

its a python program

Explanation:

# program to print the number of occurrences of a substring .

s=str(input("enter the string"))

n=str(input("enter the substring"))

if n in s:

   print("its present ")

else:

   print("its not present")

c=s.count(n)

print(n,"occurs ",c,"times")

hope it helps you

please mark brainliest

@ItzSnowySecret07

Similar questions