1#find common elements present in 2 strings
2str1 = 'abcdef'
3str2 = 'abcdf'
4com_str = ''.join(set(s1).intersection(s2))
5print(com_str)
1>>> from collections import Counter
2>>> x = Counter("balloon")
3>>> x
4Counter({'o': 2, 'a': 1, 'b': 1, 'l': 2, 'n': 1})
5>>> x['o']
62
7