Set union operation using union() function, intersection operations using intersection() function, difference operations using difference() function in python.
A = {1, 2, 3, 4, 5}
B = {6, 7, 8, 1, 4}
print(A.union(B))
print(A.intersection(B))
print(A.difference(B))
Output:
{1, 2, 3, 4, 5, 6, 7, 8}
{1, 4}
{2, 3, 5}