In this example we will show how to join two or more sets using the union() method in Python.
Source Code
set1 = {'apple', 'banana', 'orange'}
set2 = {'cow', 'sheep', 'pig'}
set3 = set1.union(set2)
print(set3)
Output:
{'cow', 'apple', 'banana', 'pig', 'sheep', 'orange'}