Vidyalelo
Python · Q37

Python Sets MCQs: Exam

Programming · Python · question 37

Q37

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

A.
{1,2,3}
B.
Error, copying of sets isn't allowed
C.
{1,2}
Answer
D.
Error, invalid syntax for remove

Answer: Option C

Solution

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