union() - Return a set containing the union of sets

Returns the union of two sets.

Example

Python
desktopComponents = {'memory', 'processor', 'hard drive'}
laptopComponents = {'memory', 'processor', 'SSD', 'camera', 'keyboard'}
greatComputer = desktopComponents.union(laptopComponents)
print(greatComputer)

Output

{'camera', 'memory', 'hard drive', 'keyboard', 'processor', 'SSD'}