Write a function that counts the occurrences of a specified non-overlapping string s2 in another string s1 using the following header:def count(s1, s2):For example, count("system error, syntax error", "error") returns 2. Write a test program that prompts the user to enter two strings and displays thenumber of occurrences of the second string in the first string.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here