set1 = {1, 2, 3, 4, 5}
set2 = {4, 5, 6, 7, 8}
# Union of two sets
union_set = set1.union(set2)
print(union_set) # Output: {1, 2, 3, 4, 5, 6, 7, 8}
# Intersection of two sets
intersection_set = set1.intersection(set2)
print(intersection_set) # Output: {4, 5}
# Difference of two sets
difference_set = set1.difference(set2)
print(difference_set) # Output: {1, 2, 3}
# Symmetric difference of two sets
symmetric_difference_set = set1.symmetric_difference(set2)
print(symmetric_difference_set) # Output: {1, 2, 3, 6, 7, 8}