For this Question: Given a string S and a char X, your task is to print the number of times the character X occurred in the string S.The input contains the string S and the character X separated by a space.

Constraints:-
1 <= |S| <= 100000
'a' <= S[i] <= 'z'
'a' <= X <= 'z'Print the number of times the character X occurred in the string S.Sample Input:-
newtonschool o

Sample Output:-
3, I have written this Solution Code: input_string, char = input().split(' ')
print(input_string.count(char)), In this Programming Language: Python, Now tell me if this Code is compilable or not?