WAP to print the number of occurrences of a substring into a line.
Answers
Answered by
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
Computer Science,
1 month ago
Math,
1 month ago
Science,
3 months ago
Science,
3 months ago
Computer Science,
9 months ago
History,
9 months ago