Vidyalelo
Python · Q28

Python Sets MCQs: Exam

Programming · Python · question 28

Q28

What will be the output of the following Python code? >>> a=1,2,3 >>> a.intersection_update(2,3,4,5) >>> a

A.
{2,3}
Answer
B.
Error, duplicate item present in list
C.
Error, no method called intersection_update for set data type
D.
{1,4,5}

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board