Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import re
- s1 = input()
- s2 = input()
- s1 = s1.lower()
- s2 = s2.lower()
- s1 = re.sub("[\s+,.?]", "", s1)
- s2 = re.sub("[\s+,.?]", "", s2)
- list1 = list(s1)
- list2 = list(s2)
- # print(list1)
- # print(list2)
- set1 = set(list1)
- set2 = set(list2)
- af1 = list(set1.intersection(set2))
- af2 = list(set1.union(set2))
- print("{:.2f}".format(len(af1) / len(af2)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement