Write a program to print count of number of unique matching characters in a pair of strings


Topic: Write a program to print count of number of unique matching characters in a pair of strings

Solution

str1="ababccd12@"
str2="bb123cca1@"
matched_chars = set(str1) & set(str2) 
print("No. of matching characters are : " + str(len(matched_chars)) )



List all Python Programs