Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write Python program with a function named print_common_characters that gets as parameters two strings. The function returns the number of characters that the strings have
Write Python program with a function named print_common_characters that gets as parameters two strings. The function returns the number of characters that the strings have in common. Each character counts only once, e.g., the strings "bee" and "peer" only have one character in common (the letter "e"). You can consider capitals different from lower case letters. Note: the function should return the number of characters that the strings have in common, and not print it. Input First line of input is the first string Second line of input is the second string Output The number of common characterse Sample Input 1 Copy see peer Sample Output 1 Copy 1 Sample Input 1 see peer Sample Output 1 1 Sample Input 2 seven seventeen Sample Output 2 4
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started