Q. What is the output of the following code when executed in Python shell?
Code:
>>> d = {1,2,3}
>>> d.intersection_update({2,3,4,5})
>>> d
β
Correct Answer: (A)
{2,3}
Explanation: The intersection_update method returns a set that contains the intersection of the two sets.