difference_update() - Removes the items in this set that are also included in another, specified set

Updates the source set by removing the items that exist in both sets.

Example

Python
desktopComponents = {'memory', 'processor', 'hard drive'}
laptopComponents = {'memory', 'processor', 'SSD', 'camera', 'keyboard'}
laptopComponents.difference_update(desktopComponents)
print(f'Components unique to the laptop computer: {laptopComponents}')

Output

Components unique to the laptop computer: {'SSD', 'camera', 'keyboard'}