Q. What is the output of this code?
Code:
a = {1, 2, 3}
a.add(2)
print(a)
β
Correct Answer: (A)
{1, 2, 3}
Explanation: Sets do not allow duplicate values; `2` is already present.