intersection_update() - Removes the items in this set that are not present in other,specified set(s)

Updates the source set with items not present in the other set.

Example

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

Output

{'memory', 'processor'}