Question: Allowed Functions list functions: append() string functions: strip() , split() other built-in functions or techniques: len() , range() , min() , in keyword, string/list slicing

Allowed Functions
list functions:
append()
string functions: strip() , split()
other built-in functions or techniques: len() , range() , min() , in keyword, string/list slicing ( [start:stop:step] )
Create a new file called count_exact_match.py . In this file, you would need to implement the following function: def count_exact_match(text, query) This function takes in two strings text and query, and returns the number of exact matches between them. An exact match is the case where the same character appears at exactly the same index of both strings. For example, count_exact_match ("severussnape", "alanrickman") returns 2, because there are two exact matches - in both strings, character ' r ' appears at index 4, and character 'a' appears at index 9. Note the following: - and query may have different lengths - In the case where a string is an empty string, the returning value should be 0 - The function is case-sensitive, so ' r ' and ' R ' are not considered as the same character
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
