intersection() - Returns a set, that is the intersection of two or more sets

Returns the items that both sets include.

Example

Python
desktopComponents = {'memory', 'processor', 'hard drive'}
laptopComponents = {'memory', 'processor', 'SSD', 'camera', 'keyboard'}
commonComponents = laptopComponents.intersection(desktopComponents)
print(f'Common components are: {commonComponents}')

Output

Common components are: {'processor', 'memory'}