Your question is Reverse String and Character Count. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Itc Infotech text-processing utilities may need to transform a string while checking how often a selected character appears. Given a string and one character, return the reversed string and the character's occurrence count in that reversed result.
The count must be case-sensitive. Spaces, punctuation, and repeated characters are valid input and must be preserved during reversal.
Implement reverse_and_count(text, character):
text is a non-empty string.character is a string containing exactly one character.reversed: the characters of text in reverse order.count: the number of times character occurs in reversed.The count should include every matching character, including occurrences separated by spaces or punctuation.
def reverse_and_count(text, character):