s1 = "yamxxopd"s2 = "yndfyamxx"# initializing countercounter = 0# creating and initializing a string without repetitions = ""for x in s1: if x not in s: s = s + xfor x in s: if x in s2: counter = counter + 1# display the number of the most amount of shared characters in two strings s1 and s2print(counter) # display 5