symmetric_difference_update() - inserts the symmetric differences from this set and another

Remove the items that are present in both sets, and insert the items that is not present in both sets.

Example

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

Output

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