Python program that Displays which letters are in the Two strings but not in both














































Python program that Displays which letters are in the Two strings but not in both



str1=input("Enter the foremost string: ") #Asking the user to enter the first string
str2=input("Enter the second string: ") #Asking the user to enter the second string
result=tuple(set(str1)^set(str2)) #Two strings are converted to sets and XOR operation takes place between them
#result is stored in the form of tuple
for i in result:
print(i)



Comments