Question: def count_common_occurrences(word1: str, word2: str) -> int: Return how many alphabetical characters in word1 also occur in word2, case insensitive (that is 'A' and

def count_common_occurrences(word1: str, word2: str) -> int: """ Return how many alphabetical characters in word1 also occur in word2, case insensitive (that is 'A' and 'a' should count as common). Spaces and punctuation do NOT count as a common character.

In this example, the B O and B all appear in lowercase form in the second argument. Notice that we count both B's in the first argument: >>> count_common_occurrences('BOB Y', 'bobbette z') 3

Here, b, o, b, and b appear in uppercase form in the second argument. We count all 3 occurrences of the letter b in the first argument: >>> count_common_occurrences('bobbette z', 'BOB Y') 4 """

# TODO: design and write the function body

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!