As the name suggests, the 'intersection_update( )' Function takes the values from both the Sets and only value that is common in both Sets are taken.
Since, 'Kriti' is the common value in both the Sets, 'intersection_update( )' Function would just take the name 'Kriti'.
x = {"Mohan", "Kriti", "Salim"} y = {"Sia", "Andrew", "Kriti"} x.intersection_update(y) print(x)
So, in the above code we have created a 'Set' and initialised to the variable 'x'.
Then what we have done is, put the names, 'Sia', 'Andrew' and 'Kriti' in another set 'y'.
And used the 'intersection_update( )' Function next.
And since, 'Kriti' is present in both the Sets, only 'Kriti' will be present in the Set 'x'
And we get the below output,