Cognizant text-processing utilities may need to count how often a particular character appears in an input string. Given a string and a target letter, return the number of exact occurrences of that letter.
The comparison is case-sensitive. Count only characters equal to the target letter, and do not count different uppercase or lowercase versions. The target is guaranteed to contain exactly one character. The input string may contain letters, digits, spaces, and punctuation.
Implement count_letter(text, letter).
text, a string, and letter, a string containing exactly one character.text whose character equals letter.def count_letter(text, letter):