코드
from collections import Counter
def solution(str1, str2) :
set1 = Counter(list(str1[i:i+2].upper() for i in range(len(str1) - 1) if str1[i:i+2].isalpha()))
set2 = Counter(list(str2[i:i+2].upper() for i in range(len(str2) - 1) if str2[i:i+2].isalpha()))
inter = set1 & set2
union = set1 | set2
return 65536 if len(union) == 0 else int((sum(inter.values()) / sum(union.values())) * 65536)