xxxxxxxxxx
A = {1, 2, 3, 4}
B = {2, 3, 5, 6}
C = {3, 4, 5, 7}
lst = [A, B, C]
result = (A | B | C) - ((A & B) | (A & C) | (B & C) | (A & B & C))
# {1, 6, 7}
xxxxxxxxxx
# Defining the two sets
first_set = {1, 5, 7, 4, 5}
second_set = {4, 5, 6, 7, 8}
# Creating the difference of the two sets
new_set = first_set - second_set
print(new_set) # Output: {1, 2, 3}