Answer:
see explanation
Explanation:
#we first get the elements as inputs
x = input("enter string A :")
y = input("enter string B :")
#then we make independent sets with each
x = set(x)
y = set(y)
#then the intersection of the two sets
intersection = set.intersection(x,y)
#another set for the alphabet
#we use set.difference to get the elements present in x and not in y, and
#viceversa, finally we get the difference between the alphabet and the #intersection of the elements in our strings
z = set('abcdefghijklmnopqrstuvwxyz')
print('\nrepeated :\n',intersection)
print('differences :\n',' Items in A and not B\n',
set.difference(x,y),'\nItems in B and not A\n',
set.difference(y,x))
print('\nItems in neither :\n',set.difference(z,intersection))